//menu sub navigation $(document).ready(function(){ $("#menu li a").hover(function() { //When trigger is clicked... //Following events are applied to the subnav itself (moving subnav up and down) $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click $(this).parent().hover(function() { }, function(){ $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up }); //Following events are applied to the trigger (Hover events for the trigger) }).hover(function() { $(this).addClass("subhover"); //On hover over, add class "subhover" }, function(){ //On Hover Out $(this).removeClass("subhover"); //On hover out, remove class "subhover" }); }); // hide boxes on full width page $(document).ready(function(){ jQuery('a[href*=#]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var jQuerytarget = jQuery(this.hash); jQuerytarget = jQuerytarget.length && jQuerytarget || jQuery('[name=' + this.hash.slice(1) +']'); if (jQuerytarget.length) { var targetOffset = jQuerytarget.offset().top; jQuery('html,body') .animate({scrollTop: targetOffset}, 1000); return false; } } }); $('.close').click(function() { $(this).parent('.box').fadeOut('slow'); }); }); //show and hide left menu $(document).ready(function(){ $('.show_left_div').click(function() { $(this).toggleClass("right_arrow").toggleClass("left_arrow"); $(".hidden_left_div").animate({width: ['toggle', 'swing']}, 'medium'); }); }); //change background if($.cookie("css")) { $("#bg").attr("href",$.cookie("css")); } $(document).ready(function() { $(".nav li a").click(function() { $("#bg").attr("href",$(this).attr('rel')); $.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'}); return false; }); }); $(function(){ $('a').focus(function(){this.blur();}); SI.Files.stylizeAll(); slider.init(); $('input.text-default').each(function(){ $(this).attr('default',$(this).val()); }).focus(function(){ if($(this).val()==$(this).attr('default')) $(this).val(''); }).blur(function(){ if($(this).val()=='') $(this).val($(this).attr('default')); }); $('input.text,textarea.text').focus(function(){ $(this).addClass('textfocus'); }).blur(function(){ $(this).removeClass('textfocus'); }); var popopenobj=0,popopenaobj=null; $('a.popup').click(function(){ var pid=$(this).attr('rel').split('|')[0],_os=parseInt($(this).attr('rel').split('|')[1]); var pobj=$('#'+pid); if(!pobj.length) return false; if(typeof popopenobj=='object' && popopenobj.attr('id')!=pid){ popopenobj.hide(50); $(popopenaobj).parent().removeClass(popopenobj.attr('id').split('-')[1]+'-open'); popopenobj=null; } return false; }); $('p.images img').click(function(){ var newbg=$(this).attr('src').split('bg/bg')[1].split('-thumb')[0]; $(document.body).css('backgroundImage','url('+_siteRoot+'images/bg/bg'+newbg+'.jpg)'); $(this).parent().find('img').removeClass('on'); $(this).addClass('on'); return false; }); $('div.sc-large div.img:has(div.tml)').each(function(){ $('div.tml',this).hide(); $(this).append(' ').find('a').css({ left:parseInt($(this).offset().left)+864,top:parseInt($(this).offset().top)+1 }).click(function(){ $(this).siblings('div.tml').slideToggle(); return false; }).focus(function(){this.blur();}); }); }); var slider={ num:-1, cur:0, cr:[], al:null, at:10*1200,//text speed and waiting time ar:true, init:function(){ if(!slider.data || !slider.data.length) return false; var d=slider.data; slider.num=d.length; var pos=Math.floor(Math.random()*1);//slider.num); for(var i=0;i'); } $('img,div#slide-controls',$('div#slide-holder')).fadeIn(); slider.text(d[pos]); slider.on(pos); slider.cur=pos; window.setTimeout('slider.auto();',slider.at); }, auto:function(){ if(!slider.ar) return false; var next=slider.cur+1; if(next>=slider.num) next=0; slider.slide(next); }, slide:function(pos){ if(pos<0 || pos>=slider.num || pos==slider.cur) return; window.clearTimeout(slider.al); slider.al=window.setTimeout('slider.auto();',slider.at); var d=slider.data; for(var i=0;i