//Drop down panel at top of the page
jQuery(document).ready(function(){jQuery("#open").click(function(){jQuery("div#panel").slideDown("slow")});jQuery("#close").click(function(){jQuery("div#panel").slideUp("slow")});
// Switch buttons from "Log In | Register" to "Close Panel" on click
jQuery("#toggle a").click(function(){jQuery("#toggle a").toggle()})});
// Portfolio Swap Functionality //
jQuery(document).ready(function(){jQuery("a.switch_thumb").toggle(function(){jQuery(this).addClass("swap");jQuery("ul.thumb_view").fadeOut("fast",function(){jQuery(this).fadeIn("fast").addClass("display")})},function(){jQuery(this).removeClass("swap");jQuery("ul.thumb_view").fadeOut("fast",function(){jQuery(this).fadeIn("fast").removeClass("display")})})});
//Image Replacement Gallery //
jQuery(document).ready(function(){jQuery(".thumbs a").click(function(){jQuery("#irg img").hide(0);jQuery("#hiddenbox").show();jQuery(this).delay(1E3,function(){jQuery("#hiddenbox").hide()});jQuery(this).delay(1E3,function(){jQuery("#irg img").show()});var b=jQuery(this).attr("href"),a=jQuery(this).attr("title");jQuery("#largeImg").attr({src:b,alt:a});jQuery(".thumb_block h3").html(" "+a+" ");return!1})});
//JQuery Navigation
jQuery.noConflict();jQuery(document).ready(function(){jQuery("#navbar li").append('<div class="hover"></div>');jQuery("#navbar li").hover(function(){jQuery(this).children("div").fadeIn("1000")},function(){jQuery(this).children("div").fadeOut("1000")}).click(function(){jQuery(this).addClass("selected")})});
//advanced slider
jQuery.noConflict();jQuery(document).ready(function(){jQuery(".slider").advancedSlider({width:750,height:345,skin:"light-round-extended",slideshow:!1,slideshowControls:!1,effectType:"simpleSlide",simpleSlideEasing:"easeInOutExpo",fadeNavigationArrows:0,thumbnailsType:"none",slideProperties:{0:{effectType:"scale",horizontalSlices:8,verticalSlices:4},1:{effectType:"fade",horizontalSlices:1,verticalSlices:1},2:{effectType:"fade",horizontalSlices:8,verticalSlices:4},3:{effectType:"fade",horizontalSlices:1,verticalSlices:1},
4:{effectType:"scale",horizontalSlices:8,verticalSlices:4,slicePattern:"spiralMarginToCenterCW"}}})});
//Tabs
jQuery.noConflict();jQuery(document).ready(function(){jQuery("div#tabs_horizontal").slideTabs({orientation:"horizontal",slideWidth:694,contentAnim:"slideLeft",contentEasing:"easeInOutExpo",tabsAnimTime:300,contentAnimTime:600})});
//smooth scrolling up and down
jQuery.noConflict();function ss_fixAllLinks(){for(var b=document.getElementsByTagName("a"),c=0;c<b.length;c++){var a=b[c];a.href&&a.href.indexOf("#")!=-1&&(a.pathname==location.pathname||"/"+a.pathname==location.pathname)&&a.search==location.search&&ss_addEvent(a,"click",smoothScroll)}}
function smoothScroll(b){if(window.event)target=window.event.srcElement;else if(b)target=b.target;else return;if(target.nodeType==3)target=target.parentNode;if(target.nodeName.toLowerCase()=="a"){anchor=target.hash.substr(1);for(var c=document.getElementsByTagName("a"),a=null,d=0;d<c.length;d++){var e=c[d];if(e.name&&e.name==anchor){a=e;break}}if(!a)return!0;c=a.offsetLeft;for(d=a.offsetTop;a.offsetParent&&a.offsetParent!=document.body;)a=a.offsetParent,c+=a.offsetLeft,d+=a.offsetTop;clearInterval(ss_INTERVAL);
cypos=ss_getCurrentYPos();ss_stepsize=parseInt((d-cypos)/ss_STEPS);ss_INTERVAL=setInterval("ss_scrollWindow("+ss_stepsize+","+d+',"'+anchor+'")',10);if(window.event)window.event.cancelBubble=!0,window.event.returnValue=!1;b&&b.preventDefault&&b.stopPropagation&&(b.preventDefault(),b.stopPropagation())}}
function ss_scrollWindow(b,c,a){wascypos=ss_getCurrentYPos();isAbove=wascypos<c;window.scrollTo(0,wascypos+b);iscypos=ss_getCurrentYPos();isAboveNow=iscypos<c;if(isAbove!=isAboveNow||wascypos==iscypos)window.scrollTo(0,c),clearInterval(ss_INTERVAL),location.hash=a}function ss_getCurrentYPos(){return document.body&&document.body.scrollTop?document.body.scrollTop:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:window.pageYOffset?window.pageYOffset:0}
function ss_addEvent(b,c,a,d){if(b.addEventListener)return b.addEventListener(c,a,d),!0;else if(b.attachEvent)return b.attachEvent("on"+c,a)}var ss_INTERVAL,ss_STEPS=25;ss_addEvent(window,"load",ss_fixAllLinks);
