
jQuery.preloadImages=function()
{for(var i=0;i<arguments.length;i++)
{jQuery("<img>").attr("src",arguments[i]);alert('preloaded '+arguments[i]);}}
$(document).ready(function(){$("a.delete").click(function(e){if(!confirm('Are you sure you wish to delete this item?'))
{return false;}});$(".favouriteLink").click(function(e){Favour_ID=$(this).attr('id').substr(1);url=$(this).attr('href');$.post(url,{ajax:true},function(xml){$("#FavourID"+Favour_ID).html($("response",xml).text());});return false;});$(".rankLink").click(function(e){Rank_ID=$(this).attr('Rank_ID');url=$(this).attr('href');$.post(url,{ajax:true},function(xml){$("#rankLink"+Rank_ID).html($("response",xml).text());});return false;});$(".approveComment").click(function(e){Comment_ID=$(this).attr('Comment_ID');url=$(this).attr('href');$.post(url,{ajax:true},function(xml){$("#approveComment"+Comment_ID).html($("response",xml).text());});return false;});$(".deleteComment").click(function(e){Comment_ID=$(this).attr('Comment_ID');url=$(this).attr('href');$.post(url,{ajax:true},function(xml){$("#comment"+Comment_ID).html($("response",xml).text());$("#commentUser"+Comment_ID).html($("response",xml).text());});return false;});$(".productLink").click(function(e){Order_ID=$(this).attr('Order_ID');location.href='/artwork/order/'+Order_ID;return false;});var hash=location.hash;if(hash)
{$(hash+'Content').addClass('highlight');}
$(".action a").prepend("+ ");$(".remove a").prepend("- ");$(".actionLink").append("&nbsp;&gt;");$(".viewMore").prepend("&gt; ");$(".close").click(function(e){$(this).parent().hide();});$(".hide").slideUp('fast');$("#searchBox input").keyup(function(e){$("#advancedSearchContent").slideDown();});var myaccount=true;$(".menuBox").prepend("&rsaquo;");width=$("#myaccountContent").width();$(".menuBox").parent().width(width);$(".menuBox").click(function(e){toggleDiv=$(this).attr('id')+'Content';$("#"+toggleDiv).toggle();if(myaccount==true){myaccount=false;}
else{myaccount=true;}
return myaccount;});$("a.toggle").prepend('<span class="showTriangle">&nbsp;</span>');$(".toggle").click(function(e){toggleDiv=$(this).attr('id')+'Content';$("#"+toggleDiv).slideToggle('normal');triangleSpan=$(this).attr('id')+' span';$("#"+triangleSpan).toggleClass("showTriangle");$("#"+triangleSpan).toggleClass("hideTriangle");return false;});$("a","#tags").append(",");$(".resultFrame").hover(function(){$(".resultTab",this).fadeIn("fast");},function(){$(".resultTab",this).fadeOut("fast");});$('a.email').each(function(){e=this.rel.replace('|','@');this.href='mailto:'+e;$(this).text(e);});$('.tabNavContent').hide();$('#tabNavContentArea').html($('.tabNavSelected').html());$('.tabNavLinks a').click(function(e){$('.tabNavLinks a').removeClass('selected');$(this).addClass('selected');showDiv=$(this).attr('href');$('#tabNavContentArea').html($(showDiv).html());return false;});currentTestimonial=0;$("#testimonials a.another").click(function(){currentTestimonial++;if(currentTestimonial>maxTestimonials){currentTestimonial=0;}
var testimonialDiv="#testimonial"+currentTestimonial;$('#testimonial0').html($(testimonialDiv).html());return false;});});$(document).ready(function(){$(".nav ul li").hover(function(){$("ul",this).fadeIn("fast");},function(){});if(document.all){$(".nav li").hoverClass("sfHover");}});$.fn.hoverClass=function(c){return this.each(function(){$(this).hover(function(){$(this).addClass(c);},function(){$(this).removeClass(c);});});};