
var uc=uc||{};uc.common=uc.common||{};uc.common.ajaxify=function(timeout){if(timeout==null)timeout=0;window.setTimeout(uc.common.fixSectionStyle,timeout);uc.utils.ajaxifyForm(jQuery('form.ajax'),uc.common.ajaxify);uc.utils.ajaxifyLink(jQuery('.pager-navigation.ajax a, #catalog a.ajax, #catalog .ajax a'),'GET',uc.common.ajaxify,true);uc.utils.ajaxifyLink(jQuery('a.ajax-post'),'POST',uc.common.ajaxify);uc.utils.ajaxifyLink(jQuery('a.ajax, .ajax a'),'GET',uc.common.ajaxify);}
uc.common.fixSectionStyle=function(){jQuery('.border-section').each(function(index){var jq_section=jQuery(this);var section_width=jq_section.outerWidth();var jq_head=jQuery('.head',jq_section);var head_width=jq_head.outerWidth();var jq_header=jQuery('.section-header',jq_section);var header_padding=parseInt(jq_header.css('padding-left'))+parseInt(jq_header.css('padding-right'))+2;jq_header.width(section_width-head_width-header_padding);});}
jQuery(document).ready(function(){uc.player.build(".media-playlist");uc.search.build('#search input',2,'#header',280,0);uc.search.build('#content .search .search-input',2,'#content .search form',470,0);uc.rating.build('form select.input-rating',10);jQuery('.form-rating').bind('rated',function(){jQuery(this).submit();});uc.common.ajaxify(200);jQuery(window.location).bind("change",function(objEvent,objData){if(uc.common.ajaxHistoryUpdate){uc.common.ajaxHistoryUpdate=false;return false;}
var hashes=document.location.href.split("#ajax/");if(hashes.length==1){uc.utils.executeServerJS(hashes[0]+'?force_reload=true',{},'GET',uc.common.ajaxify);}else if(hashes.length==2){uc.utils.executeServerJS(hashes[0]+'/'+hashes[1]+'?force_reload=true',{},'GET',uc.common.ajaxify);}});var hashes=document.location.href.split("#ajax/");if(hashes.length==2){uc.utils.executeServerJS(hashes[0]+'/'+hashes[1]+'?force_reload=true',{},'GET',uc.common.ajaxify,true);}
jQuery('input.help[type=text]').each(function(index){var jq_this=jQuery(this);var help=jq_this.val();jq_this.focus(function(){if(jq_this.val()==help)jq_this.val('');});jq_this.blur(function(){if(jq_this.val()=='')jq_this.val(help);});});});
