$(document).ready(function(){$(".permalink").click(function(){$(this).focus().select()});stopped=false;$(".rotate div").each(function(a,b){if(a!=0){$(b).hide()}});$("ul#news-thumbs a").css("cursor","pointer");$("ul#news-thumbs a").click(function(){stopped=true;elementId=$(this).attr("id").replace("newsicon-","")-1;$("ul#news-thumbs li img").each(function(){$(this).removeClass("active")});$("img",this).addClass("active");$(".rotate div").stop();$("#news-article-backgrounds img").stop();$(".rotate div").css("opacity","1");$("#news-article-backgrounds img").css("opacity","1");$(".rotate div").css("display","none");$("#news-article-backgrounds img").css("display","none");$(".rotate").children().eq(elementId).css("display","");$("#news-article-backgrounds img.news-article-splash"+(elementId+1)).css("display","")});setTimeout("nextElement()",8000);$("ul#news-thumbs li img").eq(0).addClass("active");$(".news-article").addClass("news-article-dynamic");$(".rotate").addClass("rotate-dynamic");$(".rotate").show();preloadPumaHeaderImages();initInputs()});function initInputs(){$("input.customhover").each(function(){if($(this).attr("type")=="text"){$(this).attr("data-orig",$(this).val());$(this).focus(function(){$(this).val("")});$(this).blur(function(){if($(this).val()==""){$(this).val($(this).attr("data-orig"))}})}})}function nextElement(){if(stopped){return}$(".rotate div:visible").fadeOut(800,function(){backgroundsDiv=$("#news-article-backgrounds");$("img.active",backgroundsDiv).next().fadeIn(500,function(){$(this).prev().hide();$(this).prev().removeClass("active");$(this).prev().appendTo($("#news-article-backgrounds"))});$("img.active",backgroundsDiv).next().addClass("active");var a=0;var b=0;$("ul#news-thumbs li img").each(function(){if($(this).hasClass("active")){$(this).removeClass("active");a=b}b++});if(a<$("ul#news-thumbs li img").length-1){$("ul#news-thumbs li img").eq(a+1).addClass("active")}else{$("ul#news-thumbs li img").eq(0).addClass("active")}if($(this).next().css("display")=="none"){$(this).next().fadeIn(500,function(){setTimeout("nextElement()",8000)})}else{$(this).siblings().eq(0).fadeIn(500,function(){setTimeout("nextElement()",8000)})}})}function echeck(f){var a="@";var b=".";var e=f.indexOf(a);var c=f.length;var d=f.indexOf(b);if(f.indexOf(a)==-1){alert("Invalid E-mail ID");return false}if(f.indexOf(a)==-1||f.indexOf(a)==0||f.indexOf(a)==c){alert("Invalid E-mail ID");return false}if(f.indexOf(b)==-1||f.indexOf(b)==0||f.indexOf(b)==c){alert("Invalid E-mail ID");return false}if(f.indexOf(a,(e+1))!=-1){alert("Invalid E-mail ID");return false}if(f.substring(e-1,e)==b||f.substring(e+1,e+2)==b){alert("Invalid E-mail ID");return false}if(f.indexOf(b,(e+2))==-1){alert("Invalid E-mail ID");return false}if(f.indexOf(" ")!=-1){alert("Invalid E-mail ID");return false}return true}function ValidateForm(){var a=document.newsletterform.email_update;if((a.value==null)||(a.value=="")){alert("Please Enter your Email ID");a.focus();return false}if(echeck(a.value)==false){a.value="";a.focus();return false}return true}jQuery.preloadImages=function(){for(var a=0;a<arguments.length;a++){jQuery("<img>").attr("src",arguments[a])}};function preloadPumaHeaderImages(){$.preloadImages("http://resources.puma.com/img/maindrop_top.png","http://resources.puma.com/img/maindrop.png","http://resources.puma.com/img/maindrop_seperator.png","http://resources.puma.com/img/maindrop_bottom.png")};