var newsSliderSpeed=800,newsSliderEasing="easeInOutExpo",newsSliderSelectIndex=0,newsSliderAniLeft="270px",ShowcaseIndex=0,mCtimout=4E3,mCanispeed=800,Mci=0,ShowcaseMid=0,HeadImgSelect=0,c,l,images,tic,tic_i,tind=isset("tic_index")?tic_index:0,p_c,p_l,product,captions;
$(document).ready(function(){$.browser.msie&&$("#buyform .txtbox").css({width:"auto"});tic=$("#top_img_container");tic_i=$("#top_img_container > img");if($("#cycle").length){images=$("#cycle img");if(images.length>0){c=0;l=images.length-1;images.hide().eq(c).show();$().everyTime(5E3,function(){if(c==l)c=0;else c++;images.fadeOut().eq(c).fadeIn()})}}if(pgeIndex==1){$("#quotebox").children("img").hide().eq(0).show();ShowcaseMid=$(".showcase_container").height()/2;$(".showcase_growbox").css({height:0,
width:0,top:ShowcaseMid}).corner("10px").children(".showcase_section").hide().parent()}pgeIndex==4&&$(".newscontainer").html("<p>Refreshing news items...</p>");pgeIndex==2&&$(".prodcontent").hide().eq(0).show();pgeIndex==3&&$(".faq_content").hide().eq(0).show();if(pgeIndex==2||pgeIndex==3){$(".productnav li").eq(0).css("backgroundPosition","0px -66px").children("a").css("color","#fff");$(".productnav li").mouseover(function(){$(this).css("backgroundPosition")!="0px -66px"&&$(this).css("backgroundPosition",
"0px -33px")});$(".productnav li").mouseout(function(){$(this).css("backgroundPosition")!="0px -66px"&&$(this).css("backgroundPosition","0px 0px")});$(".productnav li a").click(function(){selectindex=$(".productnav li a").index(this);$(".prodcontent").hide().eq(selectindex).show();$(".faq_content").hide().eq(selectindex).show();$(".productnav li").css("backgroundPosition","0px 0px").children("a").css("color","#666666");$(".productnav li").eq(selectindex).css("backgroundPosition","0px -66px").children("a").css("color",
"#fff");$(".faq_content").eq(selectindex).children().children(".daqTabInfo").css({display:"none"}).eq(0).css({display:"block"});$(".faq_content").eq(selectindex).children().children(".faqTabLst").children("li").children("a").removeClass("tabSelect").eq(0).addClass("tabSelect");return false});$(".product_radiobutton").click(function(){optionindex=$(".product_radiobutton").index(this);optionindex==2?$(".dropbox").eq(0).hide():$(".dropbox").eq(0).show()})}if(pgeIndex==5){$(".bluebox").draggable();$(".redbox").droppable({drop:function(){$(this).css("backgroundPosition",
"bottom");$(".bluebox").hide();$("#contactreturn").text("Processing...").show();t1=$(".txtbox").eq(0).val();t2=$(".txtbox").eq(1).val();t3=$(".txtbox").eq(2).val();t4=$(".txtbox").eq(3).val();t5=$(".txtbox").eq(4).val();t6=$("#contactform .theHf").val();if(CheckEmail(t2)&&t1!=""&&t2==t3&&t6=="")$.post("scripts/php/contact.php",{f1:t1,f2:t2,f3:t3,f4:t4,f5:t5},function(a){$("#contactreturn").AnimateMessage(a);$(".txtbox").val("")});else{$("#contactreturn").AnimateMessage("Please enter your name and a valid email address.");
$(".bluebox").css({top:83,left:154}).show();$(this).css("backgroundPosition","top")}}})}tic_i.css({opacity:0}).eq(tind).css({opacity:1});$("a").click(function(){if($(this).attr("rel")=="nw")window.open($(this).attr("href"));else if($(this).attr("href")!="#"&&$(this).attr("href")!="")window.location=$(this).attr("href");return false});$(".showcase_section").eq(1).flash({src:"vids/sif.swf",width:440,height:260},{version:8});$(".showcase_section").eq(0).flash({src:"vids/sportslog.swf",width:440,height:260},
{version:8});pgeIndex==1&&$.post("scripts/php/news.php",{funcrequest:"newsslider"},function(a){$("#hp_newsticker_inner").html(a);$(".hp_newsticker_sec").css("left",newsSliderAniLeft).eq(0).css("left","0px")});$("#contactform").submit(function(){return false});$("#cart").submit(function(){return false});$("#baf").submit(function(){thisVal=$("#baf .txtbox").val();CheckEmail(thisVal)?$.post("scripts/php/baf.php",{emailadd:thisVal,site:"SSL"},function(a){$("#contactreturn").AnimateMessage(a)}):$("#contactreturn").AnimateMessage("Please enter a valid email address.");
return false});$(".popC").css({zIndex:100}).children(".mask").animate({opacity:0},{duration:0,queue:false}).parent().children(".diag").corner("5px cc:#303030").centreElm();$(window).bind("resize",function(){$(".popC .diag").centreElm()});$(document).keyup(function(a){a.keyCode==27&&$(".popC").children(".diag").css({display:"none"}).parent().children(".mask").animate({opacity:0},300,function(){$(this).parent().css({display:"none"})})});$(".popC .diag .closePop").click(function(){$(".popC").children(".diag").css({display:"none"}).parent().children(".mask").animate({opacity:0},
300,function(){$(this).parent().css({display:"none"})});return false});$(window).bind("load",function(){if(ProductIndex==9){$(".popC").css({display:"block"}).children(".mask").animate({opacity:0.8},{duration:300,queue:false});$(".popC .diag").centreElm()}tic.height($("#top_img_container img").eq(0).height());tic.children("img").eq(0).fadeIn(200);$(".navlist li a").mouseover(function(){$(".navlist li a").index(this)==5?$("#pop_products").fadeIn(300):$("#pop_products").fadeOut(300)});$(".navlist li a").mouseout(function(){$(".navlist li a").index(this)!=
5&&$("#pop_products").fadeOut(300)});$(".faq_prodinfo").children(".faq_content").children("h3").click(function(){selectindex=$(".faq_prodinfo").children(".faq_content").children("h3").index(this);$(".faq_prodinfo").children(".faq_content").children(".faqanswer").eq(selectindex).slideToggle(300)});$(".daqTabInfo").eq(0).css({display:"block"});$(".faqTabLst li a").click(function(){thsIndex=$(this).parent().parent().children().children().index(this);$(this).parent().siblings("li").children("a").removeClass("tabSelect");
$(this).addClass("tabSelect");$(this).parent().parent().parent().children(".daqTabInfo").css({display:"none"}).eq(thsIndex).css({display:"block"});return false});$(".daqTabInfo h3").click(function(){selectindex=$(".daqTabInfo h3").index(this);$(".daqTabInfo .faqanswer").eq(selectindex).slideToggle(300)});$(".showcase_growbox").animate({width:444,height:280,top:0},600,newsSliderEasing,function(){$(this).children(".showcase_section").eq(0).fadeIn(300)});$(".arrow").hover(function(){ti=$(".arrow").index(this)+
1;tic_i.animate({opacity:0},{queue:false,duration:300}).eq(ti).animate({opacity:1},{queue:false,duration:500})},function(){tic_i.animate({opacity:0},{queue:false,duration:300}).eq(tind).animate({opacity:1},{queue:false,duration:500})});if(pgeIndex==2){$(".pi_thumbs").crossFade();$(".ss_caption").crossFade({element:"p"})}pgeIndex==4&&$.post("scripts/php/news.php",{funcrequest:"newsfull"},function(a){$(".newscontainer").html(a);$(".newsitemcontent").hide();$(".newscontainer h3").click(function(){$(this).parent().children(".newsitemcontent").slideToggle(300)})});
pgeIndex==10&&$(".s_cycle .s_container").each(function(){$(this).crossFade()});LoadVals()})});
$(function(){$.fn.ShwcaseAnimate=function(a,b){scSection=$(this).children(".showcase_section");scCount=scSection.size()-1;scSection.eq(ShowcaseIndex).fadeOut(300,function(){ShowcaseBoxAni(function(){scNextShow=ReturnNextInLine(scCount,a,ShowcaseIndex);scSection.eq(ShowcaseIndex).fadeOut(300);scSection.eq(scNextShow).fadeIn(300,function(){ShowcaseIndex=scNextShow;b!=undefined&&b()})})})};$.fn.NewsSlider=function(a,b){elementcount=$(this).children(".hp_newsticker_sec").size()-1;if(a=="left"){nStartPos=
"-"+newsSliderAniLeft;nAniOutPos=newsSliderAniLeft}else{nStartPos=newsSliderAniLeft;nAniOutPos="-"+newsSliderAniLeft}if(elementcount>0){$(this).children(".hp_newsticker_sec").css("left",nStartPos).eq(newsSliderSelectIndex).css("left","0px");nextAnimate=ReturnNextInLine(elementcount,a,newsSliderSelectIndex);NewsSliderAni(newsSliderSelectIndex,nextAnimate,$(this),nAniOutPos,".hp_newsticker_sec",function(){b!=undefined&&b()});newsSliderSelectIndex=nextAnimate}};$.fn.MyCycle=function(){imgcount=$(this).children("img").size()-
1;if(imgcount>0)if(Mci==imgcount){mCanimate(Mci,0,$(this));Mci=0}else{mCanimate(Mci,Mci+1,$(this));Mci++}};$.fn.AnimateMessage=function(a){$(this).text(a).fadeIn(300,function(){$(this).animate({opacity:1},3E3,function(){$(this).fadeOut(300)})})};$.fn.extend({crossFade:function(a){a=$.extend({duration:300,timeout:4E3,element:"img"},a);return this.each(function(){var b=a.duration,d=a.timeout,g=a.element,e=$(this).children(g),f,h=e.size()-1;if(h>0){e.hide().eq(0).fadeIn(b,function(){jQuery.browser.msie&&
$(this).get(0).style.removeAttribute("filter")});setInterval(function(){e.each(function(){thisIndex=e.index(this);if($(this).css("display")=="inline"||$(this).css("display")=="block"){f=thisIndex;nextFade=thisIndex==h?0:thisIndex+1}});e.eq(f).fadeOut(b);e.eq(nextFade).fadeIn(b,function(){jQuery.browser.msie&&$(this).get(0).style.removeAttribute("filter")})},d)}else e.hide().eq(0).fadeIn(b)})}})});
(function(a){a.fn.extend({centreElm:function(b){b=a.extend({easing:"easeInOutExpo",aniSpeed:300},b);return this.each(function(){var d=b.easing,g=b.aniSpeed,e=a(this),f=e.height(),h=e.width(),i=a(window).height(),j=a(window).width();e.animate({top:i/2-f/2,left:j/2-h/2},{duration:g,easing:d,queue:false})})}})})(jQuery);function ShowcaseInter(){$(".showcase_container").animate({opacity:1},5E3,function(){$(".showcase_growbox").ShwcaseAnimate("left");ShowcaseInter()})}
function ShowcaseBoxAni(a){$(".showcase_growbox").animate({width:0,height:0,top:ShowcaseMid},600,newsSliderEasing,function(){$(this).animate({width:444,height:280,top:0},600,newsSliderEasing,function(){a!=undefined&&a()})})}function NewsSliderAni(a,b,d,g,e,f){d.children(e).eq(b).animate({left:"0px"},{duration:newsSliderSpeed,queue:false,easing:newsSliderEasing});d.children(e).eq(a).animate({left:g},newsSliderSpeed,newsSliderEasing,function(){f!=undefined&&f()})}
function mCanimate(a,b,d){d.animate({opacity:1},mCtimout,function(){$(this).children("img").eq(a).fadeOut(mCanispeed);$(this).children("img").eq(b).fadeIn(mCanispeed);d.MyCycle()})}function ReturnNextInLine(a,b,d){return b=="left"?d==0?a:d-1:d==a?0:d+1}function NewsTicker(){$("#hp_newsticker_inner").animate({opacity:1},mCtimout,function(){$(this).NewsSlider("right",function(){NewsTicker()})})}
function LoadVals(){$(".np_news_arrowleft").click(function(){$("#hp_newsticker_inner").stop().NewsSlider("left",function(){NewsTicker()});return false});$(".np_news_arrowright").click(function(){$("#hp_newsticker_inner").stop().NewsSlider("right",function(){NewsTicker()});return false});$(".showcasearrowleft").click(function(){$(".showcase_container").stop();$(".showcase_growbox").ShwcaseAnimate("left",function(){});return false});$(".showcasearrowright").click(function(){$(".showcase_container").stop();
$(".showcase_growbox").ShwcaseAnimate("right",function(){});return false});NewsTicker()}function CheckEmail(a){AtPos=a.indexOf("@");StopPos=a.lastIndexOf(".");return AtPos==-1||StopPos==-1?false:true}function isset(a){return typeof window[a]!="undefined"};
