/*

 Supersubs v0.2b - jQuery plugin
 Copyright (c) 2008 Joel Birch

 Dual licensed under the MIT and GPL licenses:
 http://www.opensource.org/licenses/mit-license.php
 http://www.gnu.org/licenses/gpl.html


 This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
 their longest list item children. If you use this, please expect bugs and report them
 to the jQuery Google Group with the word 'Superfish' in the subject line.

*/
(function(a){a.fn.supersubs=function(b){var c=a.extend({},a.fn.supersubs.defaults,b);return this.each(function(){var d=a(this),e=a.meta?a.extend({},c,d.data()):c,k=a('<li id="menu-fontsize">&#8212;</li>').css({padding:0,position:"absolute",top:"-999em",width:"auto"}).appendTo(d).width();a("#menu-fontsize").remove();$ULs=d.find("ul");$ULs.each(function(g){g=$ULs.eq(g);var h=g.children(),l=h.children("a"),f=h.css("white-space","nowrap").css("float"),j=g.add(h).add(l).css({"float":"none",width:"auto"}).end().end()[0].clientWidth/
k;j+=e.extraWidth;if(j>e.maxWidth)j=e.maxWidth;else if(j<e.minWidth)j=e.minWidth;j+="em";g.css("width",j);h.css({"float":f,width:"100%","white-space":"normal"}).each(function(){var m=a(">ul",this),n=m.css("left")!==undefined?"left":"right";m.css(n,j)})})})};a.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);/*

 Superfish v1.4.8 - jQuery menu widget
 Copyright (c) 2008 Joel Birch

 Dual licensed under the MIT and GPL licenses:
 http://www.opensource.org/licenses/mit-license.php
 http://www.gnu.org/licenses/gpl.html

 CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
(function(a){a.fn.superfish=function(c){var d=a.fn.superfish,e=d.c,k=a(['<span class="',e.arrowClass,'"> &#187;</span>'].join("")),g=function(){var f=a(this),j=l(f);clearTimeout(j.sfTimer);f.showSuperfishUl().siblings().hideSuperfishUl()},h=function(){var f=a(this),j=l(f),m=d.op;clearTimeout(j.sfTimer);j.sfTimer=setTimeout(function(){m.retainPath=a.inArray(f[0],m.$path)>-1;f.hideSuperfishUl();m.$path.length&&f.parents(["li.",m.hoverClass].join("")).length<1&&g.call(m.$path)},m.delay)},l=function(f){f=
f.parents(["ul.",e.menuClass,":first"].join(""))[0];d.op=d.o[f.serial];return f};return this.each(function(){var f=this.serial=d.o.length,j=a.extend({},d.defaults,c);j.$path=a("li."+j.pathClass,this).slice(0,j.pathLevels).each(function(){a(this).addClass([j.hoverClass,e.bcClass].join(" ")).filter("li:has(ul)").removeClass(j.pathClass)});d.o[f]=d.op=j;a("li:has(ul)",this)[a.fn.hoverIntent&&!j.disableHI?"hoverIntent":"hover"](g,h).each(function(){j.autoArrows&&a(">a:first-child",this).addClass(e.anchorClass).append(k.clone())}).not("."+
e.bcClass).hideSuperfishUl();var m=a("a",this);m.each(function(n){var o=m.eq(n).parents("li");m.eq(n).focus(function(){g.call(o)}).blur(function(){h.call(o)})});j.onInit.call(this)}).each(function(){var f=[e.menuClass];d.op.dropShadows&&!(a.browser.msie&&a.browser.version<7)&&f.push(e.shadowClass);a(this).addClass(f.join(" "))})};var b=a.fn.superfish;b.o=[];b.op={};b.IE7fix=function(){var c=b.op;a.browser.msie&&a.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined&&this.toggleClass(b.c.shadowClass+
"-off")};b.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};b.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};a.fn.extend({hideSuperfishUl:function(){var c=b.op,d=c.retainPath===true?c.$path:"";c.retainPath=
false;d=a(["li.",c.hoverClass].join(""),this).add(this).not(d).removeClass(c.hoverClass).find(">ul").hide().css("visibility","hidden");c.onHide.call(d);return this},showSuperfishUl:function(){var c=b.op,d=this.addClass(c.hoverClass).find(">ul:hidden").css("visibility","visible");b.IE7fix.call(d);c.onBeforeShow.call(d);d.animate(c.animation,c.speed,function(){b.IE7fix.call(d);c.onShow.call(d)});return this}})})(jQuery);jQuery(document).ready(function(){jQuery(".menu").supersubs({minWidth:9,maxWidth:15,extraWidth:1}).superfish({delay:200,animation:{opacity:"show",height:"show"},speed:50,dropShadows:false})});function check_make_purchase_button(){toggle=jQuery("#noca_gateway").attr("checked");if(toggle==true)jQuery("#OCPsubmit").show();else{jQuery(".make_purchase").show();jQuery("#OCPsubmit").hide()}}
jQuery(document).ready(function(){jQuery("#shippingSameBilling").click(function(){jQuery(".wpsc_shipping_forms").show();jQuery("#shippingSameBilling").livequery(function(){if(jQuery(this).is(":checked")){var b=jQuery("input[title='billingfirstname']").val(),c=jQuery("input[title='billinglastname']").val(),d=jQuery("textarea[title='billingaddress']").val(),e=jQuery("input[title='billingcity']").val(),k=jQuery("input[title='billingpostcode']").val(),g=jQuery("input[title='billingphone']").val(),h=jQuery("input[title='billingfirstname']").val(),
l=jQuery("select[title='billingregion'] :selected").text(),f=jQuery("select[title='billingregion'] :selected").val(),j=jQuery("select[title='billingcountry'] :selected").text(),m=jQuery("select[title='billingcountry'] :selected").val();jQuery("input[title='shippingfirstname']").val(b);jQuery("input[title='shippinglastname']").val(c);jQuery("textarea[title='shippingaddress']").val(d);jQuery("input[title='shippingcity']").val(e);jQuery("input[title='shippingpostcode']").val(k);jQuery("input[title='shippingphone']").val(g);
jQuery("input[title='shippingemail']").val(h);jQuery("input[title='shippingstate']").val(f);jQuery("input.shipping_country").val(m);jQuery("span.shipping_country_name").html(j);jQuery("input.shipping_region").val(m);jQuery("select#current_country").val(m);if(l==""){l=jQuery("select.current_region :selected").text();f=jQuery("select.current_region :selected").val();if(l==""){jQuery("select#region").hide();b=jQuery("input.shipping_region").attr("name");jQuery("input.shipping_region").attr("id");jQuery("input.shipping_region").replaceWith('<input  class="shipping_region" type="text" value="'+
l+'" name="'+b+'" id="'+b+'" />');jQuery("span.shipping_region_name").replaceWith('<span class="shipping_region_name"></span>')}else{jQuery("select#region").show();jQuery("select#region :selected").html(l).attr("selected","selected");b=jQuery("input.shipping_region").attr("name");jQuery("input.shipping_region").attr("id");jQuery("input.shipping_region").replaceWith('<input type="hidden" value="'+f+'" name="'+b+'" id="'+b+'" class="shipping_region" />');jQuery("input.shipping_region").append('<span class="shipping_region_name">'+
l+"</span>")}}else{jQuery("select#region").show();b=jQuery("input.shipping_region").attr("name");jQuery("input.shipping_region").attr("id");jQuery("input.shipping_region").replaceWith('<input type="hidden"  class="shipping_region" value="'+f+'" name="'+b+'" id="'+b+'" />');jQuery(".shipping_region_name").replaceWith('<span class="shipping_region_name">'+l+"</span>");jQuery("select#region :selected").html(l).attr("selected","selected");jQuery("select[title='shippingregion']").val(f)}jQuery("select[title='shipping_country']").val(m);
l=jQuery("select[title='shipping_country']").attr("id");f=jQuery("select[title='shipping_country']").attr("name");if(f!=null){f=f.replace("collected_data[","");f=f.replace("]","");f=f.replace("[0]","");set_shipping_country(l,f);if(jQuery("select[title='billingcountry'] :selected").val()!=jQuery("select[name='country'] :selected").val()){id=jQuery("select[name='country'] :selected").val();id=="undefined"&&jQuery("select[name='country']").val(m)}}submit_change_country(true)}})});jQuery("form.product_form").submit(function(){file_upload_elements=
jQuery.makeArray(jQuery("input[type=file]",jQuery(this)));if(file_upload_elements.length>0)return true;else{form_values=jQuery(this).serialize();jQuery("#fancy_notification").length==0&&jQuery("div.wpsc_loading_animation",this).css("visibility","visible");jQuery.post("index.php?ajax=true",form_values,function(b){eval(b);jQuery("div.wpsc_loading_animation").css("visibility","hidden");jQuery("#fancy_notification")!=null&&jQuery("#loading_animation").css("display","none")});wpsc_fancy_notification(this);
return false}});jQuery("a.wpsc_category_link, a.wpsc_category_image_link").click(function(){product_list_count=jQuery.makeArray(jQuery("ul.category-product-list"));if(product_list_count.length>0){jQuery("ul.category-product-list",jQuery(this).parent()).toggle();return false}});jQuery("form.product_form").livequery(function(){product_id=jQuery("input[name=product_id]",this).val();image_element_id="product_image_"+product_id;jQuery("#"+image_element_id).data("product_id",product_id);parent_container=
jQuery(this).parents("div.product_view_"+product_id);jQuery("div.item_no_image",parent_container).data("product_id",product_id)});jQuery("a.additional_description_link").click(function(){parent_element=jQuery(this).parent(".additional_description_span");jQuery(".additional_description",parent_element).toggle();return false});jQuery("div.wpsc_variation_forms .wpsc_select_variation").change(function(){parent_form=jQuery(this).parents("form.product_form");form_values=jQuery("input[name=product_id],div.wpsc_variation_forms .wpsc_select_variation",
parent_form).serialize();jQuery.post("index.php?update_product_price=true",form_values,function(b){eval(b);if(product_id!=null){target_id="product_price_"+product_id;second_target_id="donation_price_"+product_id;buynow_id="BB_BuyButtonForm"+product_id;if(jQuery("input#"+target_id).attr("type")=="text")jQuery("input#"+target_id).val(numeric_price);else{price=price.replace(".00","");jQuery("#"+target_id).html(price)}jQuery("input#"+second_target_id).val(numeric_price)}});return false});jQuery("div.shopping_cart_container").livequery(function(){object_html=
jQuery(this).html();window.parent.jQuery("div.shopping-cart-wrapper").html(object_html)});jQuery("div.wpsc_cart_loading").livequery(function(){form_values="ajax=true";jQuery.post("index.php?wpsc_ajax_action=get_cart",form_values,function(b){eval(b)})});jQuery("form.wpsc_product_rating").livequery(function(){jQuery(this).rating()});jQuery("form.wpsc_empty_the_cart").livequery(function(){jQuery(this).submit(function(){form_values="ajax=true&";form_values+=jQuery(this).serialize();jQuery.post("index.php",
form_values,function(b){eval(b)});return false})});jQuery("form.wpsc_empty_the_cart span.emptycart a").livequery(function(){jQuery(this).click(function(){parent_form=jQuery(this).parents("form.wpsc_empty_the_cart");form_values="ajax=true&";form_values+=jQuery(parent_form).serialize();jQuery.post("index.php",form_values,function(b){eval(b)});return false})});var a=jQuery(".productcart input:radio[name=shipping_method]");if(a.length==1)jQuery(a).click();else a.length>1&&jQuery(".productcart input:radio[name=shipping_method]:checked").click()});
function switchmethod(a,b){form_values="ajax=true&";form_values+="wpsc_ajax_action=update_shipping_price&";form_values+="key1="+b+"&";form_values+="key="+a;jQuery.post("index.php",form_values,function(c){eval(c)})}
function submit_change_country(a){if(a){a="ajax=true&wpsc_ajax_actions=update_location&country="+jQuery("#current_country  :selected").val();var b=jQuery("#region :selected").val();if(typeof b!="undefined")a+="&region="+b;jQuery.post("index.php",a,function(){});jQuery.post("index.php","wpsc_ajax_action=update_shipping_price",function(c){eval(c)})}else document.forms.change_country.submit()}
function wpsc_fancy_notification(a){if(typeof WPSC_SHOW_FANCY_NOTIFICATION=="undefined")WPSC_SHOW_FANCY_NOTIFICATION=true;if(WPSC_SHOW_FANCY_NOTIFICATION==true&&jQuery("#fancy_notification")!=null){form_button_id=jQuery(a).attr("id")+"_submit_button";a={};new_container_offset=jQuery("#maincolumn").offset();if(a.left==null){a.left=new_container_offset.left;a.top=new_container_offset.top}var b={};new_button_offset=jQuery("#"+form_button_id).offset();if(b.left==null){b.left=new_button_offset.left;b.top=
new_button_offset.top}jQuery("#fancy_notification").css("left",b.left-a.left+10+"px");jQuery("#fancy_notification").css("top",b.top-a.top-60+"px");jQuery("#fancy_notification").css("display","block");jQuery("#loading_animation").css("display","block");jQuery("#fancy_notification_content").css("display","none")}}
function shopping_cart_collapser(){switch(jQuery("#sliding_cart").css("display")){case "none":jQuery("#sliding_cart").slideToggle("fast",function(){jQuery.post("index.php","ajax=true&set_slider=true&state=1",function(){});jQuery("#fancy_collapser").attr("src",WPSC_URL+"/images/minus.png")});break;default:jQuery("#sliding_cart").slideToggle("fast",function(){jQuery.post("index.php","ajax=true&set_slider=true&state=0",function(){});jQuery("#fancy_collapser").attr("src",WPSC_URL+"/images/plus.png")});
break}return false}function set_billing_country(a,b){var c="";country=jQuery("select[class=current_country]").val();region=jQuery("select[class=current_region]").val();if(/[\d]{1,}/.test(region))c="&billing_region="+region;form_values="wpsc_ajax_action=change_tax&form_id="+b+"&billing_country="+country+c;jQuery.post("index.php",form_values,function(d){eval(d)})}
function set_shipping_country(a,b){var c="";country=jQuery("div#"+a+" select[class=current_country]").val();if(country=="undefined")country=jQuery("select[title='billingcountry']").val();region=jQuery("div#"+a+" select[class=current_region]").val();if(/[\d]{1,}/.test(region))c="&shipping_region="+region;form_values="wpsc_ajax_action=change_tax&form_id="+b+"&shipping_country="+country+c;jQuery.post("index.php",form_values,function(d){eval(d)})};function ajax_item(a){if(typeof a=="string")a=document.getElementById(a);return a}function collect(a,b){for(var c=[],d=0;d<a.length;d++){var e=b(a[d]);e!=null&&c.push(e)}return c}ajax={};ajax.x=function(){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(b){return new XMLHttpRequest}}};
ajax.serialize=function(a){var b=function(e){return e.name?encodeURIComponent(e.name)+"="+encodeURIComponent(e.value):""},c=collect(a.getElementsByTagName("input"),function(e){if(e.type!="radio"&&e.type!="checkbox"||e.checked)return b(e)}),d=collect(a.getElementsByTagName("select"),b);a=collect(a.getElementsByTagName("textarea"),b);return c.concat(d).concat(a).join("&")};
ajax.send=function(a,b,c,d){var e=ajax.x();e.open(c,a,true);e.onreadystatechange=function(){e.readyState==4&&b(e.responseText)};c=="POST"&&e.setRequestHeader("Content-type","application/x-www-form-urlencoded");e.send(d)};ajax.get=function(a,b){ajax.send(a,b,"GET")};ajax.gets=function(a){var b=ajax.x();b.open("GET",a,false);b.send(null);return b.responseText};ajax.post=function(a,b,c){ajax.send(a,b,"POST",c)};ajax.update=function(a,b){var c=ajax_item(b);ajax.get(a,function(d){c.innerHTML=d})};
ajax.submit=function(a,b,c){var d=ajax_item(b);ajax.post(a,function(e){d.innerHTML=e},ajax.serialize(c))};jQuery.noConflict();
var base_url="http://www.evokenz.com",WPSC_URL="http://www.evokenz.com/wp-content/plugins/wp-e-commerce",WPSC_IMAGE_URL="http://www.evokenz.com/wp-content/uploads/wpsc/product_images/",WPSC_DIR_NAME="wp-e-commerce",fileLoadingImage="http://www.evokenz.com/wp-content/plugins/wp-e-commerce/images/loading.gif",fileBottomNavCloseImage="http://www.evokenz.com/wp-content/plugins/wp-e-commerce/images/closelabel.gif",fileThickboxLoadingImage="http://www.evokenz.com/wp-content/plugins/wp-e-commerce/images/loadingAnimation.gif",resizeSpeed=
9,borderSize=10;(function(a){a.extend(a.fn,{livequery:function(c,d,e){var k=this,g;if(a.isFunction(c)){e=d;d=c;c=undefined}a.each(a.livequery.queries,function(h,l){if(k.selector==l.selector&&k.context==l.context&&c==l.type&&(!d||d.$lqguid==l.fn.$lqguid)&&(!e||e.$lqguid==l.fn2.$lqguid))return(g=l)&&false});g=g||new a.livequery(this.selector,this.context,c,d,e);g.stopped=false;g.run();return this},expire:function(c,d,e){var k=this;if(a.isFunction(c)){e=d;d=c;c=undefined}a.each(a.livequery.queries,function(g,h){if(k.selector==
h.selector&&k.context==h.context&&(!c||c==h.type)&&(!d||d.$lqguid==h.fn.$lqguid)&&(!e||e.$lqguid==h.fn2.$lqguid)&&!this.stopped)a.livequery.stop(h.id)});return this}});a.livequery=function(c,d,e,k,g){this.selector=c;this.context=d||document;this.type=e;this.fn=k;this.fn2=g;this.elements=[];this.stopped=false;this.id=a.livequery.queries.push(this)-1;k.$lqguid=k.$lqguid||a.livequery.guid++;if(g)g.$lqguid=g.$lqguid||a.livequery.guid++;return this};a.livequery.prototype={stop:function(){var c=this;if(this.type)this.elements.unbind(this.type,
this.fn);else this.fn2&&this.elements.each(function(d,e){c.fn2.apply(e)});this.elements=[];this.stopped=true},run:function(){if(!this.stopped){var c=this,d=this.elements,e=a(this.selector,this.context),k=e.not(d);this.elements=e;if(this.type){k.bind(this.type,this.fn);d.length>0&&a.each(d,function(g,h){a.inArray(h,e)<0&&a.event.remove(h,c.type,c.fn)})}else{k.each(function(){c.fn.apply(this)});this.fn2&&d.length>0&&a.each(d,function(g,h){a.inArray(h,e)<0&&c.fn2.apply(h)})}}}};a.extend(a.livequery,
{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if(a.livequery.running&&a.livequery.queue.length)for(var c=a.livequery.queue.length;c--;)a.livequery.queries[a.livequery.queue.shift()].run()},pause:function(){a.livequery.running=false},play:function(){a.livequery.running=true;a.livequery.run()},registerPlugin:function(){a.each(arguments,function(c,d){if(a.fn[d]){var e=a.fn[d];a.fn[d]=function(){var k=e.apply(this,arguments);a.livequery.run();return k}}})},run:function(c){if(c!=
undefined)a.inArray(c,a.livequery.queue)<0&&a.livequery.queue.push(c);else a.each(a.livequery.queries,function(d){a.inArray(d,a.livequery.queue)<0&&a.livequery.queue.push(d)});a.livequery.timeout&&clearTimeout(a.livequery.timeout);a.livequery.timeout=setTimeout(a.livequery.checkQueue,20)},stop:function(c){c!=undefined?a.livequery.queries[c].stop():a.each(a.livequery.queries,function(d){a.livequery.queries[d].stop()})}});a.livequery.registerPlugin("append","prepend","after","before","wrap","attr",
"removeAttr","addClass","removeClass","toggleClass","empty","remove");a(function(){a.livequery.play()});var b=a.prototype.init;a.prototype.init=function(c,d){var e=b.apply(this,arguments);if(c&&c.selector){e.context=c.context;e.selector=c.selector}if(typeof c=="string"){e.context=d||document;e.selector=c}return e};a.prototype.init.prototype=a.prototype})(jQuery);jQuery.fn.rating=function(){return this.each(function(){function a(){k();this_parent=jQuery(this).parent();previous_elements=jQuery(this,this_parent).prevAll();next_elements=jQuery(this,this_parent).nextAll();jQuery("a",previous_elements).addClass("selected");jQuery("a",next_elements).removeClass("selected")}function b(){k()}function c(){jQuery(this).removeClass("on")}function d(){k();jQuery(this).addClass("on")}function e(){product_id=jQuery("a",this).attr("rel");rating=jQuery("a",this).html();form_values=
"ajax=true&";form_values+="wpsc_ajax_action=rate_product&";form_values+="product_id="+product_id+"&";form_values+="product_rating="+rating;jQuery.post("index.php",form_values,function(f){eval(f)});h=rating;parent_element=jQuery(this).parent();previous_elements=jQuery(this,this_parent).prevAll();next_elements=jQuery(this,this_parent).nextAll();jQuery("a",previous_elements).addClass("selected");jQuery("a",next_elements).removeClass("selected");jQuery("a",this).addClass("selected");return false}function k(){l.removeClass("on hover")}
var g=jQuery("<div/>").attr({title:this.title,className:this.className}).insertAfter(this);product_id=jQuery("input.wpsc_rating_product_id",this).val();var h=jQuery("select option:selected",this).val();jQuery("select option",this).each(function(){className="";if(this.value<=h)className="selected";g.append("<div class='star'><a class='"+className+"' href='#"+this.value+"' title='Give it a "+this.value+" Star Rating' rel="+product_id+">"+this.value+"</a></div>")});var l=g.find("div.star").mouseover(a).focus(a).mouseout(b).blur(b).click(e);
g.find("div.cancel").mouseover(d).focus(d).mouseout(c).blur(c).click(e);g.mouseout(function(){selected_element=jQuery("div.star a:contains("+h+")",this).parent("div.star");previous_elements=jQuery(selected_element,this).prevAll();next_elements=jQuery(selected_element,this).nextAll();jQuery("a",previous_elements).addClass("selected");jQuery("a",next_elements).removeClass("selected")})}).remove()};jQuery.browser.msie==true&&document.execCommand("BackgroundImageCache",false,true);var testsuccess=0,lnid=[];function categorylist(a){self.location=a}var noresults=function(){return true};function roundNumber(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)}
var getresults=function(a){eval(a);window.drag_and_drop_cart_updater&&drag_and_drop_cart_updater();if(document.getElementById("loadingimage")!=null)document.getElementById("loadingindicator").style.visibility="hidden";else if(document.getElementById("alt_loadingimage")!=null)document.getElementById("alt_loadingindicator").style.visibility="hidden";if(document.getElementById("sliding_cart")!=null&&document.getElementById("sliding_cart").style.display=="none"){jQuery("#fancy_collapser").attr("src",
WPSC_URL+"/images/minus.png");jQuery("#sliding_cart").show("fast",function(){ajax.post("index.php",noresults,"ajax=true&set_slider=true&state=1")})}document.getElementById("fancy_notification")!=null&&jQuery("#loading_animation").css("display","none")};
function submitform(a,b){if(b!=false)b=true;ajax.post("index.php?ajax=true&user=true",getresults,ajax.serialize(a));if(document.getElementById("loadingimage")!=null){document.getElementById("loadingimage").src=WPSC_URL+"/images/indicator.gif";document.getElementById("loadingindicator").style.visibility="visible"}else if(document.getElementById("alt_loadingimage")!=null){document.getElementById("alt_loadingimage").src=WPSC_URL+"/images/indicator.gif";document.getElementById("alt_loadingindicator").style.visibility=
"visible"}if(b==true&&document.getElementById("fancy_notification")!=null){var c={margin:1,border:1,padding:1,scroll:1};form_button_id=a.id+"_submit_button";var d={};new_container_offset=jQuery("#products_page_container").offset(c,d);if(d.left==null){d.left=new_container_offset.left;d.top=new_container_offset.top}var e={};new_button_offset=jQuery("#"+form_button_id).offset(c,e);if(e.left==null){e.left=new_button_offset.left;e.top=new_button_offset.top}jQuery("#fancy_notification").css("left",e.left-
d.left+10+"px");jQuery("#fancy_notification").css("top",e.top-d.top-60+"px");jQuery("#fancy_notification").css("display","block");jQuery("#loading_animation").css("display","block");jQuery("#fancy_notification_content").css("display","none")}return false}
function prodgroupswitch(a){if(a=="brands"){jQuery(".categorydisplay").css("display","none");jQuery(".branddisplay").css("display","block")}else if(a=="categories"){jQuery(".categorydisplay").css("display","block");jQuery(".branddisplay").css("display","none")}return false}var previous_rating;
function ie_rating_rollover(a,b){target_element=document.getElementById(a);switch(b){case 1:previous_rating=target_element.style.background;target_element.style.background="url("+WPSC_URL+"/images/blue-star.gif)";break;default:if(target_element.style.background!="url("+WPSC_URL+"/images/gold-star.gif)")target_element.style.background=previous_rating;break}}
var apply_rating=function(a){outarr=a.split(",");for(i=1;i<=outarr[1];i++){id="star"+outarr[0]+"and"+i+"_link";document.getElementById(id).style.background="url("+WPSC_URL+"/images/gold-star.gif)"}for(i=5;i>outarr[1];i--){id="star"+outarr[0]+"and"+i+"_link";document.getElementById(id).style.background="#c4c4b8"}lnid[outarr[0]]=1;rating_id="rating_"+outarr[0]+"_text";if(document.getElementById(rating_id).innerHTML!="Your Rating:")document.getElementById(rating_id).innerHTML="Your Rating:";saved_id=
"saved_"+outarr[0]+"_text";document.getElementById(saved_id).style.display="inline";update_vote_count(outarr[0])};function hide_save_indicator(a){document.getElementById(a).style.display="none"}function rate_item(a,b){ajax.post("index.php",apply_rating,"ajax=true&rate_item=true&product_id="+a+"&rating="+b)}
function update_vote_count(a){ajax.post("index.php",function(b){outarr=b.split(",");vote_count=outarr[0];a=outarr[1];vote_count_id="vote_total_"+a;document.getElementById(vote_count_id).innerHTML=vote_count},"ajax=true&get_rating_count=true&product_id="+a)}
function update_preview_url(a){image_height=document.getElementById("image_height").value;image_width=document.getElementById("image_width").value;new_url=image_height>0&&image_height<=1024&&image_width>0&&image_width<=1024?"index.php?productid="+a+"&height="+image_height+"&width="+image_width+"":"index.php?productid="+a+"";document.getElementById("preview_link").setAttribute("href",new_url);return false}
function change_variation(a,b,c){special_prefix=value_ids="";form_id=c==true?"specials_"+a:"product_"+a;for(var d in b)if(!isNaN(parseInt(d))){variation_name="variation["+b[d]+"]";value_ids+="&variation[]="+document.getElementById(form_id).elements[variation_name].value}ajax.post("index.php",c==true?function(e){eval(e);if(a!=null){target_id="special_product_price_"+a;buynow_id="BB_BuyButtonForm"+a;document.getElementById(target_id).firstChild.innerHTML=price;if(price.substring(27,price.indexOf("&"))!=
"")document.getElementById(buynow_id).item_price_1.value=price.substring(27,price.indexOf("&"))}}:function(e){eval(e);if(a!=null){target_id="product_price_"+a;buynow_id="BB_BuyButtonForm"+a;jQuery("input#"+target_id).attr("type")=="text"?jQuery("input#"+target_id).val(numeric_price):jQuery("#"+target_id+" span.pricedisplay").html(price)}},"ajax=true&get_updated_price=true&product_id="+a+value_ids)}
function show_details_box(a,b){state=document.getElementById(a).style.display;if(state!="block"){document.getElementById(a).style.display="block";document.getElementById(b).src=WPSC_URL+"/images/icon_window_collapse.gif"}else{document.getElementById(a).style.display="none";document.getElementById(b).src=WPSC_URL+"/images/icon_window_expand.gif"}return false}
var register_results=function(a){jQuery("div#TB_ajaxContent").html(a);jQuery("div#checkout_login_box").css("border","1px solid #339933");jQuery("div#checkout_login_box").css("background-color","#e8fcea")};function submit_register_form(a){jQuery("img#register_loading_img").css("display","inline");ajax.post("index.php?ajax=true&action=register",register_results,ajax.serialize(a));return false}var fadeInSuggestion=function(a){$(a).fadeTo(300,1)},fadeOutSuggestion=function(a){$(a).fadeTo(300,0)};
function change_pics(a){location1=window.location.href;if(a==1){document.getElementById("out_view_type").innerHTML="<input type='hidden' id='view_type' name='view_type' value='default'>";document.getElementById("out_default_pic").innerHTML="<img id='default_pic' src='"+WPSC_URL+"/images/default-on.gif'>";document.getElementById("out_grid_pic").innerHTML="<img id='grid_pic' style='cursor:pointer;' onclick='change_pics(0)' src='"+WPSC_URL+"/images/grid-off.gif'>";$new_location=location1.search(/view_type/)!=
-1?location1.replace("grid","default"):location1.search(/\?/)!=-1?location1+"&view_type=default":location1+"?view_type=default"}else{document.getElementById("out_view_type").innerHTML="<input type='hidden' id='view_type' name='view_type' value='grid'>";document.getElementById("out_default_pic").innerHTML="<img id='default_pic'  style='cursor:pointer;' onclick='change_pics(1)' src='"+WPSC_URL+"/images/default-off.gif'>";document.getElementById("out_grid_pic").innerHTML="<img id='grid_pic' src='"+WPSC_URL+
"/images/grid-on.gif'>";$new_location=location1.search(/view_type/)!=-1?location1.replace("default","grid"):location1.search(/\?/)!=-1?location1+"&view_type=grid":location1+"?view_type=grid"}window.location=$new_location}function log_buynow(a){id=a.product_id.value;price=a.item_price_1.value;ajax.post("index.php",noresults,"ajax=true&buynow=true&product_id="+id+"price="+price)}function gotoexternallink(a){window.location=a}
function manage_extras(a,b,c){extra_idss=special_prefix=value_ids="";document.getElementById("extras_indicator"+a+b).style.display="block";form_id=c==true?"specials_"+a:"product_"+a;jQuery(document).ready(function(){extra_ids=jQuery("input.extras_"+a+":checked")});jQuery.each(extra_ids,function(d){extra_idss+="&extra[]="+extra_ids[d].value});pm="stay";ajax.post("index.php",c==true?function(d){eval(d);if(a!=null){target_id="special_product_price_"+a;buynow_id="BB_BuyButtonForm"+a;document.getElementById(target_id).firstChild.innerHTML=
price;if(price.substring(27,price.indexOf("&"))!="")document.getElementById(buynow_id).item_price_1.value=price.substring(27,price.indexOf("&"))}document.getElementById("extras_indicator"+a+b).style.display="none"}:function(d){eval(d);if(a!=null){target_id="product_price_"+a;buynow_id="BB_BuyButtonForm"+a;document.getElementById(target_id).firstChild.innerHTML=price;if(price.substring(27,price.indexOf("&"))!="")document.getElementById(form_id).item_price_1.value=price.substring(27,price.indexOf("&"))}document.getElementById("extras_indicator"+
a+b).style.display="none"},"ajax=true&get_updated_price=true&pm="+pm+"&product_id="+a+extra_idss)}function store_list(){address=document.getElementById("user_address").value;city=document.getElementById("user_city").value;if(address!=""&&city!=""){document.getElementById("gloc_loading").style.display="block";ajax.post("index.php",return_store_list,"ajax=true&store_list=true&addr="+address+"&city="+city)}}
var return_store_list=function(a){document.getElementById("gloc_storelist").innerHTML=a;document.getElementById("gloc_loading").style.display="none";return true};function autocomplete(a){if(!a)a=window.event;if(a.keyCode)keyPressed=a.keyCode;else if(a.which)keyPressed=a.which;str=document.getElementById("wpsc_search_autocomplete").value;str!=""?ajax.post("index.php",autocomplete_results,"wpsc_live_search=true&keyword="+str):jQuery("#blind_down").slideUp(100)}
var autocomplete_results=function(a){document.getElementById("blind_down").innerHTML=a;document.getElementById("blind_down").style.display!="block"&&jQuery("#blind_down").slideDown(200);return true};
function statusTextKeyPress(a){if(!a)a=window.event;if(a.keyCode)keyPressed=a.keyCode;else if(a.which)keyPressed=a.which;if(keyPressed==9)return false;if(keyPressed==13){newstatus=document.getElementById("status_change_text").value;ajax.post("index.php",submit_user_status,"ajax=true&submitstatus=true&status="+newstatus);return false}if(keyPressed==27){document.getElementById("edit_status_select").style.display="none";return false}return true}
var usps_method_switch=function(a){shipping=a.split("---");shipping1=shipping[1];jQuery("#checkout_total").html(shipping[0]);jQuery(".total > .pricedisplay").remove();jQuery(".total > .totalhead").after(shipping[0]);jQuery(".postage > .pricedisplay").remove();jQuery(".postage > .postagehead").after(shipping1)};function add_meta_box(){jQuery(".time_requested").datepicker({dateFormat:"yy-mm-dd"})}function submit_purchase(){document.forms.ideal_form.submit()}function do_nothing(){}
jQuery(document).ready(function(){if(jQuery("#openair").val()==1){var a=0,b=9999,c=0,d=0;jQuery("div.product_grid_item").each(function(){jQuery(this).css("margin","0");if(jQuery(this).height()>a)a=jQuery(this).height();var e=jQuery(this).offset();if(e.left<=b)b=e.left;if(e.top>d)d=e.top;if(e.left>c)c=e.left});jQuery("div.product_grid_item:last").each(function(){jQuery(this).offset().left!=c&&jQuery(this).css("border-right","1px solid #ddd")});jQuery("div.product_grid_item").each(function(){var e=
jQuery(this).offset();if(e.left==b){setTimeout("do_nothing",200);jQuery(this).css("border-left","0px solid #ddd")}e.top==d&&jQuery(this).css("border-bottom","0px solid #ddd");jQuery(this).height(a+30)})}jQuery("div.custom_gateway table").each(function(){jQuery(this).css("display")=="none"&&jQuery("input",this).attr("disabled",true)});jQuery("input.custom_gateway").change(function(){if(jQuery(this).attr("checked")==true){parent_div=jQuery(this).parents("div.custom_gateway");jQuery("table input",parent_div).attr("disabled",
false);jQuery("table",parent_div).css("display","block");jQuery("div.custom_gateway table").not(jQuery("table",parent_div)).css("display","none");jQuery("div.custom_gateway table input").not(jQuery("table input",parent_div)).attr("disabled",true)}})});