
/***************************** /home/common/js/common_all.js **********************************************/

function include_dom(script_filename) {

	document.write('<' + 'script');
    document.write(' language="javascript"');
    document.write(' type="text/javascript"');
    document.write(' src="' + script_filename + '">');
    document.write('</' + 'script' + '>');
    
}

	$(document).ready(function (){
		
		$('#siteSearchForm').submit(function (){
			 var url = $(this).attr('action');
			 keyword = $('#siteSearchForm input[type=text]').val();
			 url += 'keyword/'+keyword;
			 document.location.href = url;
			 return false;
	 	});
 	 
	
		switch(page)
		{
			case "contact_us":
			case "return_policy":
			case "link_us":
				$.meta.setType("attr", "validate");
				$("#custInfo").validate();				
				
				// alternate to captcha
				$.get(this_www_root+'ajax.php?cmd=set_form_token',function (data){
					var hdn = '<input type="hidden" name="ts" value="'+data+'">'
					$('#custInfo').append(hdn);
				});			
			break;
            
            case "related_products":
                 jQuery('#related-products').jcarousel({
                    scroll:4,
                    visible:3,
                    initCallback: function (){
                            jQuery('#loading-div').hide();
                            jQuery('.jcarousel-skin-tango').css('visibility','visible');
                            
                        }
                    }); 
            break;
			
			
		}
	});

function append_script_to_header(script_path)
{	
	var script = $('script').filter('[src="'+script_path+'"]');
	if(script.length == 0)
	{
		var str_include = '<' + 'script';
	    str_include += ' language="javascript"';
	    str_include += ' type="text/javascript"';
	    str_include += ' src="' + script_path  + '">';
	    str_include += '</' + 'script' + '>';
			     
	    $('head').append(str_include);
	}
}

function append_script_to_footer(script_path)
{	
	var script = $('script').filter('[src="'+script_path+'"]');	
	if(script.length == 0)
	{
		var str_include = '<' + 'script';
	    str_include += ' language="javascript"';
	    str_include += ' type="text/javascript"';
	    str_include += ' src="' + script_path  + '">';
	    str_include += '</' + 'script' + '>';
			     
	    $('body').append(str_include);
	}
}

function append_style_to_footer(style_path)
{
    var style = $('style').filter('[href="'+style_path+'"]');	
	if(style.length == 0)
	{
	   //<link rel="stylesheet" type="text/css" href="print.css" media="print" />

		var str_include = '<' + 'link';
	    str_include += ' rel="stylesheet"';
	    str_include += ' type="text/css"';
	    str_include += ' href="' + style_path  + '"';
	    str_include += ' />';
			     
	    $('body').append(str_include);
	}
}


var popUpWin=0;

function popUpWindow(URLStr,width,height)
{

  var left = 50;
  var top = 50;

  if(width<1)
  	width = 420;

  if(height<1)
  	height = 495;

  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
  //popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
  //popUpWin = open(URLStr, 'popUpWin');

}

function roundoff(number,decimal_places)
{
	number = ""+number;
	dot_pos = number.indexOf(".");
	//console.log(dot_pos);
	if(dot_pos==-1){
		// decimal point not found
		// append zeros
		number += "."; 
		for(i=0;i<decimal_places;i++){
			number += "0";
		}
		//console.log(number);
		new_number = number;
		//console.log(new_number);
	}else{
		num_part = dot_pos + decimal_places +1;
		//console.log("indexof: "+num_part);
		new_number = number.substr(0,num_part);
		//console.log(new_number);
		//new_number = (new_number);
	}
	return new_number;
}




function is_valid_email(email){
	return email.match(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) ;
}

function is_empty_string(str){	
	
	if(str == ''){
		return true;
	}else if (typeof str=="string" && str.match(/^\s$/i)) {		
		return true;	
	}else{		
		return false;
	}
	
}

function getMousePosX(e)
{
	var posx = 0;
	
	if (!e) var e = window.event;
	if (e.pageX) 	{
		posx = e.pageX;
		
	}
	else if (e.clientX ) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;		
	}
	
	return posx;
}

function getMousePosY(e)
{	
	var posy = 0;
	if (!e) var e = window.event;
	if ( e.pageY) {		
		posy = e.pageY;
	}
	else if (e.clientY) {		
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}
	
	return posy;

}


function str_replace(search, replace, str)
{
	while(str.indexOf(search) != -1){
        str = str.replace(search,replace);
    }
	return str;
}

/***************************** /home/common/js/jquery/jquery.metadata.js **********************************************/

/*
 * Metadata - jQuery plugin for parsing metadata from elements
 *
 * Copyright (c) 2006 John Resig, Yehuda Katz, Jï¿½Ã¶rn Zaefferer, Paul McLanahan
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $
 *
 */

/**
 * Sets the type of metadata to use. Metadata is encoded in JSON, and each property
 * in the JSON will become a property of the element itself.
 *
 * There are four supported types of metadata storage:
 *
 *   attr:  Inside an attribute. The name parameter indicates *which* attribute.
 *          
 *   class: Inside the class attribute, wrapped in curly braces: { }
 *   
 *   elem:  Inside a child element (e.g. a script tag). The
 *          name parameter indicates *which* element.
 *   html5: Values are stored in data-* attributes.
 *          
 * The metadata for an element is loaded the first time the element is accessed via jQuery.
 *
 * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
 * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
 * 
 * @name $.metadata.setType
 *
 * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
 * @before $.metadata.setType("class")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from the class attribute
 * 
 * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
 * @before $.metadata.setType("attr", "data")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from a "data" attribute
 * 
 * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
 * @before $.metadata.setType("elem", "script")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from a nested script element
 * 
 * @example <p id="one" class="some_class" data-item_id="1" data-item_label="Label">This is a p</p>
 * @before $.metadata.setType("html5")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from a series of data-* attributes
 *
 * @param String type The encoding type
 * @param String name The name of the attribute to be used to get metadata (optional)
 * @cat Plugins/Metadata
 * @descr Sets the type of encoding to be used when loading metadata for the first time
 * @type undefined
 * @see metadata()
 */

(function($) {

$.extend({
  metadata : {
    defaults : {
      type: 'class',
      name: 'metadata',
      cre: /({.*})/,
      single: 'metadata'
    },
    setType: function( type, name ){
      this.defaults.type = type;
      this.defaults.name = name;
    },
    get: function( elem, opts ){
      var settings = $.extend({},this.defaults,opts);
      // check for empty string in single property
      if ( !settings.single.length ) settings.single = 'metadata';
      
      var data = $.data(elem, settings.single);
      // returned cached data if it already exists
      if ( data ) return data;
      
      data = "{}";
      
      var getData = function(data) {
        if(typeof data != "string") return data;
        
        if( data.indexOf('{') < 0 ) {
          data = eval("(" + data + ")");
        }
      }
      
      var getObject = function(data) {
        if(typeof data != "string") return data;
        
        data = eval("(" + data + ")");
        return data;
      }
      
      if ( settings.type == "html5" ) {
        var object = {};
        $( elem.attributes ).each(function() {
          var name = this.nodeName;
          if(name.match(/^data-/)) name = name.replace(/^data-/, '');
          else return true;
          object[name] = getObject(this.nodeValue);
        });
      } else {
        if ( settings.type == "class" ) {
          var m = settings.cre.exec( elem.className );
          if ( m )
            data = m[1];
        } else if ( settings.type == "elem" ) {
          if( !elem.getElementsByTagName ) return;
          var e = elem.getElementsByTagName(settings.name);
          if ( e.length )
            data = $.trim(e[0].innerHTML);
        } else if ( elem.getAttribute != undefined ) {
          var attr = elem.getAttribute( settings.name );
          if ( attr )
            data = attr;
        }
        object = getObject(data.indexOf("{") < 0 ? "{" + data + "}" : data);
      }
      
      $.data( elem, settings.single, object );
      return object;
    }
  }
});

/**
 * Returns the metadata object for the first member of the jQuery object.
 *
 * @name metadata
 * @descr Returns element's metadata object
 * @param Object opts An object contianing settings to override the defaults
 * @type jQuery
 * @cat Plugins/Metadata
 */
$.fn.metadata = function( opts ){
  return $.metadata.get( this[0], opts );
};

})(jQuery);

$.meta = $.metadata;

/***************************** /home/common/js/jquery/jquery.validate.js **********************************************/

/*
 * jQuery validation plug-in 1.5.5
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 JÃ¶rn Zaefferer
 *
 * $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7($){$.H($.2M,{1F:7(d){l(!6.F){d&&d.2p&&30.1z&&1z.57("3B 2B, 4L\'t 1F, 6e 3B");8}q c=$.17(6[0],\'u\');l(c){8 c}c=2c $.u(d,6[0]);$.17(6[0],\'u\',c);l(c.p.3C){6.3w("1x, 3n").1m(".4H").3e(7(){c.3b=w});l(c.p.2I){6.3w("1x, 3n").1m(":20").3e(7(){c.1U=6})}6.20(7(b){l(c.p.2p)b.5Y();7 2l(){l(c.p.2I){l(c.1U){q a=$("<1x 1k=\'5x\'/>").1t("v",c.1U.v).3L(c.1U.R).56(c.V)}c.p.2I.Z(c,c.V);l(c.1U){a.3F()}8 L}8 w}l(c.3b){c.3b=L;8 2l()}l(c.N()){l(c.1g){c.1v=w;8 L}8 2l()}1b{c.2w();8 L}})}8 c},M:7(){l($(6[0]).31(\'N\')){8 6.1F().N()}1b{q b=w;q a=$(6[0].N).1F();6.P(7(){b&=a.J(6)});8 b}},4G:7(c){q d={},$J=6;$.P(c.1T(/\\s/),7(a,b){d[b]=$J.1t(b);$J.6o(b)});8 d},1h:7(h,k){q f=6[0];l(h){q i=$.17(f.N,\'u\').p;q d=i.1h;q c=$.u.36(f);2q(h){1e"1f":$.H(c,$.u.1J(k));d[f.v]=c;l(k.I)i.I[f.v]=$.H(i.I[f.v],k.I);2L;1e"3F":l(!k){Q d[f.v];8 c}q e={};$.P(k.1T(/\\s/),7(a,b){e[b]=c[b];Q c[b]});8 e}}q g=$.u.41($.H({},$.u.3Y(f),$.u.3X(f),$.u.3S(f),$.u.36(f)),f);l(g.13){q j=g.13;Q g.13;g=$.H({13:j},g)}8 g}});$.H($.5u[":"],{5t:7(a){8!$.1j(a.R)},5o:7(a){8!!$.1j(a.R)},5k:7(a){8!a.3J}});$.u=7(b,a){6.p=$.H({},$.u.2N,b);6.V=a;6.4l()};$.u.15=7(c,b){l(U.F==1)8 7(){q a=$.3I(U);a.4V(c);8 $.u.15.1M(6,a)};l(U.F>2&&b.29!=3D){b=$.3I(U).4R(1)}l(b.29!=3D){b=[b]}$.P(b,7(i,n){c=c.27(2c 3z("\\\\{"+i+"\\\\}","g"),n)});8 c};$.H($.u,{2N:{I:{},26:{},1h:{},1c:"3t",24:"M",2E:"4N",2w:w,3s:$([]),2A:$([]),3C:w,3q:[],3p:L,4M:7(a){6.3l=a;l(6.p.4K&&!6.4J){6.p.1S&&6.p.1S.Z(6,a,6.p.1c,6.p.24);6.1P(a).2y()}},4E:7(a){l(!6.1u(a)&&(a.v 14 6.1o||!6.G(a))){6.J(a)}},6n:7(a){l(a.v 14 6.1o||a==6.4z){6.J(a)}},6l:7(a){l(a.v 14 6.1o)6.J(a)},34:7(a,c,b){$(a).1V(c).2t(b)},1S:7(a,c,b){$(a).2t(c).1V(b)}},6d:7(a){$.H($.u.2N,a)},I:{13:"6c 4p 31 13.",1Z:"K 37 6 4p.",1K:"K O a M 1K 67.",1p:"K O a M 66.",1r:"K O a M 1r.",22:"K O a M 1r (64).",2n:"4c 4b 49 2J 5Z¼5X 5U 2J.",1C:"K O a M 1C.",2f:"4c 4b 49 5P 5M 2J.",1O:"K O 5J 1O",2i:"K O a M 5G 5F 1C.",3W:"K O 3V 5B R 5z.",3R:"K O a R 5w a M 5v.",18:$.u.15("K O 3P 5s 2W {0} 2P."),1y:$.u.15("K O 5n 5l {0} 2P."),2k:$.u.15("K O a R 4A {0} 3K {1} 2P 5h."),2m:$.u.15("K O a R 4A {0} 3K {1}."),1A:$.u.15("K O a R 5d 2W 4d 4f 4s {0}."),1B:$.u.15("K O a R 53 2W 4d 4f 4s {0}.")},4r:L,4Z:{4l:7(){6.2u=$(6.p.2A);6.4v=6.2u.F&&6.2u||$(6.V);6.2o=$(6.p.3s).1f(6.p.2A);6.1o={};6.4T={};6.1g=0;6.1d={};6.1a={};6.1L();q f=(6.26={});$.P(6.p.26,7(d,c){$.P(c.1T(/\\s/),7(a,b){f[b]=d})});q e=6.p.1h;$.P(e,7(b,a){e[b]=$.u.1J(a)});7 1q(a){q b=$.17(6[0].N,"u");b.p["3H"+a.1k]&&b.p["3H"+a.1k].Z(b,6[0])}$(6.V).1q("3G 3E 4S",":2H, :4Q, :4P, 28, 4O",1q).1q("3e",":3A, :3y",1q);l(6.p.3x)$(6.V).3v("1a-N.1F",6.p.3x)},N:7(){6.3u();$.H(6.1o,6.1s);6.1a=$.H({},6.1s);l(!6.M())$(6.V).2G("1a-N",[6]);6.1i();8 6.M()},3u:7(){6.2F();S(q i=0,11=(6.23=6.11());11[i];i++){6.2a(11[i])}8 6.M()},J:7(a){a=6.2D(a);6.4z=a;6.2C(a);6.23=$(a);q b=6.2a(a);l(b){Q 6.1a[a.v]}1b{6.1a[a.v]=w}l(!6.3r()){6.12=6.12.1f(6.2o)}6.1i();8 b},1i:7(b){l(b){$.H(6.1s,b);6.T=[];S(q c 14 b){6.T.2e({19:b[c],J:6.21(c)[0]})}6.1l=$.3o(6.1l,7(a){8!(a.v 14 b)})}6.p.1i?6.p.1i.Z(6,6.1s,6.T):6.3m()},2U:7(){l($.2M.2U)$(6.V).2U();6.1o={};6.2F();6.2S();6.11().2t(6.p.1c)},3r:7(){8 6.2g(6.1a)},2g:7(a){q b=0;S(q i 14 a)b++;8 b},2S:7(){6.2z(6.12).2y()},M:7(){8 6.3k()==0},3k:7(){8 6.T.F},2w:7(){l(6.p.2w){3j{$(6.3i()||6.T.F&&6.T[0].J||[]).1m(":4I").3g()}3f(e){}}},3i:7(){q a=6.3l;8 a&&$.3o(6.T,7(n){8 n.J.v==a.v}).F==1&&a},11:7(){q a=6,2V={};8 $([]).1f(6.V.11).1m(":1x").1I(":20, :1L, :4F, [4D]").1I(6.p.3q).1m(7(){!6.v&&a.p.2p&&30.1z&&1z.3t("%o 4C 3P v 4B",6);l(6.v 14 2V||!a.2g($(6).1h()))8 L;2V[6.v]=w;8 w})},2D:7(a){8 $(a)[0]},2x:7(){8 $(6.p.2E+"."+6.p.1c,6.4v)},1L:7(){6.1l=[];6.T=[];6.1s={};6.1n=$([]);6.12=$([]);6.1v=L;6.23=$([])},2F:7(){6.1L();6.12=6.2x().1f(6.2o)},2C:7(a){6.1L();6.12=6.1P(a)},2a:7(d){d=6.2D(d);l(6.1u(d)){d=6.21(d.v)[0]}q a=$(d).1h();q c=L;S(X 14 a){q b={X:X,3d:a[X]};3j{q f=$.u.1Y[X].Z(6,d.R.27(/\\r/g,""),d,b.3d);l(f=="1X-1W"){c=w;6m}c=L;l(f=="1d"){6.12=6.12.1I(6.1P(d));8}l(!f){6.4y(d,b);8 L}}3f(e){6.p.2p&&30.1z&&1z.6k("6j 6i 6h 6g J "+d.4u+", 2a 3V \'"+b.X+"\' X");6f e;}}l(c)8;l(6.2g(a))6.1l.2e(d);8 w},4t:7(a,b){l(!$.1D)8;q c=6.p.39?$(a).1D()[6.p.39]:$(a).1D();8 c&&c.I&&c.I[b]},4q:7(a,b){q m=6.p.I[a];8 m&&(m.29==4o?m:m[b])},4w:7(){S(q i=0;i<U.F;i++){l(U[i]!==2s)8 U[i]}8 2s},2v:7(a,b){8 6.4w(6.4q(a.v,b),6.4t(a,b),!6.p.3p&&a.6b||2s,$.u.I[b],"<4n>6a: 69 19 68 S "+a.v+"</4n>")},4y:7(b,a){q c=6.2v(b,a.X);l(16 c=="7")c=c.Z(6,a.3d,b);6.T.2e({19:c,J:b});6.1s[b.v]=c;6.1o[b.v]=c},2z:7(a){l(6.p.2r)a=a.1f(a.4m(6.p.2r));8 a},3m:7(){S(q i=0;6.T[i];i++){q a=6.T[i];6.p.34&&6.p.34.Z(6,a.J,6.p.1c,6.p.24);6.35(a.J,a.19)}l(6.T.F){6.1n=6.1n.1f(6.2o)}l(6.p.1E){S(q i=0;6.1l[i];i++){6.35(6.1l[i])}}l(6.p.1S){S(q i=0,11=6.4k();11[i];i++){6.p.1S.Z(6,11[i],6.p.1c,6.p.24)}}6.12=6.12.1I(6.1n);6.2S();6.2z(6.1n).4j()},4k:7(){8 6.23.1I(6.4i())},4i:7(){8 $(6.T).4h(7(){8 6.J})},35:7(a,c){q b=6.1P(a);l(b.F){b.2t().1V(6.p.1c);b.1t("4g")&&b.3h(c)}1b{b=$("<"+6.p.2E+"/>").1t({"S":6.33(a),4g:w}).1V(6.p.1c).3h(c||"");l(6.p.2r){b=b.2y().4j().65("<"+6.p.2r+"/>").4m()}l(!6.2u.63(b).F)6.p.4e?6.p.4e(b,$(a)):b.62(a)}l(!c&&6.p.1E){b.2H("");16 6.p.1E=="1w"?b.1V(6.p.1E):6.p.1E(b)}6.1n=6.1n.1f(b)},1P:7(a){8 6.2x().1m("[S=\'"+6.33(a)+"\']")},33:7(a){8 6.26[a.v]||(6.1u(a)?a.v:a.4u||a.v)},1u:7(a){8/3A|3y/i.Y(a.1k)},21:7(d){q c=6.V;8 $(61.60(d)).4h(7(a,b){8 b.N==c&&b.v==d&&b||4a})},1N:7(a,b){2q(b.48.47()){1e\'28\':8 $("46:2B",b).F;1e\'1x\':l(6.1u(b))8 6.21(b.v).1m(\':3J\').F}8 a.F},45:7(b,a){8 6.2K[16 b]?6.2K[16 b](b,a):w},2K:{"5W":7(b,a){8 b},"1w":7(b,a){8!!$(b,a.N).F},"7":7(b,a){8 b(a)}},G:7(a){8!$.u.1Y.13.Z(6,$.1j(a.R),a)&&"1X-1W"},44:7(a){l(!6.1d[a.v]){6.1g++;6.1d[a.v]=w}},43:7(a,b){6.1g--;l(6.1g<0)6.1g=0;Q 6.1d[a.v];l(b&&6.1g==0&&6.1v&&6.N()){$(6.V).20()}1b l(!b&&6.1g==0&&6.1v){$(6.V).2G("1a-N",[6])}},2b:7(a){8 $.17(a,"2b")||$.17(a,"2b",5S={32:4a,M:w,19:6.2v(a,"1Z")})}},1Q:{13:{13:w},1K:{1K:w},1p:{1p:w},1r:{1r:w},22:{22:w},2n:{2n:w},1C:{1C:w},2f:{2f:w},1O:{1O:w},2i:{2i:w}},42:7(a,b){a.29==4o?6.1Q[a]=b:$.H(6.1Q,a)},3X:7(b){q a={};q c=$(b).1t(\'5O\');c&&$.P(c.1T(\' \'),7(){l(6 14 $.u.1Q){$.H(a,$.u.1Q[6])}});8 a},3S:7(c){q a={};q d=$(c);S(X 14 $.u.1Y){q b=d.1t(X);l(b){a[X]=b}}l(a.18&&/-1|5N|5L/.Y(a.18)){Q a.18}8 a},3Y:7(a){l(!$.1D)8{};q b=$.17(a.N,\'u\').p.39;8 b?$(a).1D()[b]:$(a).1D()},36:7(b){q a={};q c=$.17(b.N,\'u\');l(c.p.1h){a=$.u.1J(c.p.1h[b.v])||{}}8 a},41:7(d,e){$.P(d,7(c,b){l(b===L){Q d[c];8}l(b.2Z||b.2j){q a=w;2q(16 b.2j){1e"1w":a=!!$(b.2j,e.N).F;2L;1e"7":a=b.2j.Z(e,e);2L}l(a){d[c]=b.2Z!==2s?b.2Z:w}1b{Q d[c]}}});$.P(d,7(a,b){d[a]=$.5K(b)?b(e):b});$.P([\'1y\',\'18\',\'1B\',\'1A\'],7(){l(d[6]){d[6]=2Y(d[6])}});$.P([\'2k\',\'2m\'],7(){l(d[6]){d[6]=[2Y(d[6][0]),2Y(d[6][1])]}});l($.u.4r){l(d.1B&&d.1A){d.2m=[d.1B,d.1A];Q d.1B;Q d.1A}l(d.1y&&d.18){d.2k=[d.1y,d.18];Q d.1y;Q d.18}}l(d.I){Q d.I}8 d},1J:7(a){l(16 a=="1w"){q b={};$.P(a.1T(/\\s/),7(){b[6]=w});a=b}8 a},5I:7(c,a,b){$.u.1Y[c]=a;$.u.I[c]=b||$.u.I[c];l(a.F<3){$.u.42(c,$.u.1J(c))}},1Y:{13:7(b,c,a){l(!6.45(a,c))8"1X-1W";2q(c.48.47()){1e\'28\':q d=$("46:2B",c);8 d.F>0&&(c.1k=="28-5H"||($.2X.2R&&!(d[0].5E[\'R\'].5D)?d[0].2H:d[0].R).F>0);1e\'1x\':l(6.1u(c))8 6.1N(b,c)>0;5C:8 $.1j(b).F>0}},1Z:7(e,g,i){l(6.G(g))8"1X-1W";q f=6.2b(g);l(!6.p.I[g.v])6.p.I[g.v]={};6.p.I[g.v].1Z=16 f.19=="7"?f.19(e):f.19;i=16 i=="1w"&&{1p:i}||i;l(f.32!==e){f.32=e;q j=6;6.44(g);q h={};h[g.v]=e;$.2O($.H(w,{1p:i,3U:"2T",3T:"1F"+g.v,5A:"5y",17:h,1E:7(c){q b=c===w;l(b){q d=j.1v;j.2C(g);j.1v=d;j.1l.2e(g);j.1i()}1b{q a={};a[g.v]=f.19=c||j.2v(g,"1Z");j.1i(a)}f.M=b;j.43(g,b)}},i));8"1d"}1b l(6.1d[g.v]){8"1d"}8 f.M},1y:7(b,c,a){8 6.G(c)||6.1N($.1j(b),c)>=a},18:7(b,c,a){8 6.G(c)||6.1N($.1j(b),c)<=a},2k:7(b,d,a){q c=6.1N($.1j(b),d);8 6.G(d)||(c>=a[0]&&c<=a[1])},1B:7(b,c,a){8 6.G(c)||b>=a},1A:7(b,c,a){8 6.G(c)||b<=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\.\\d{3})+)(?:,\\d+)?$/.Y(a)},1O:7(a,b){8 6.G(b)||/^\\d+$/.Y(a)},2i:7(b,e){l(6.G(e))8"1X-1W";l(/[^0-9-]+/.Y(b))8 L;q a=0,d=0,2d=L;b=b.27(/\\D/g,"");S(n=b.F-1;n>=0;n--){q c=b.5a(n);q d=59(c,10);l(2d){l((d*=2)>9)d-=9}a+=d;2d=!2d}8(a%10)==0},3R:7(b,c,a){a=16 a=="1w"?a.27(/,/g,\'|\'):"58|55?g|54";8 6.G(c)||b.52(2c 3z(".("+a+")$","i"))},3W:7(b,c,a){8 b==$(a).3L()}}});$.15=$.u.15})(38);(7($){q c=$.2O;q d={};$.2O=7(a){a=$.H(a,$.H({},$.51,a));q b=a.3T;l(a.3U=="2T"){l(d[b]){d[b].2T()}8(d[b]=c.1M(6,U))}8 c.1M(6,U)}})(38);(7($){$.P({3g:\'3G\',50:\'3E\'},7(b,a){$.1G.3a[a]={4Y:7(){l($.2X.2R)8 L;6.4X(b,$.1G.3a[a].3c,w)},4W:7(){l($.2X.2R)8 L;6.4U(b,$.1G.3a[a].3c,w)},3c:7(e){U[0]=$.1G.37(e);U[0].1k=a;8 $.1G.2l.1M(6,U)}}});$.H($.2M,{1q:7(d,e,c){8 6.3v(d,7(a){q b=$(a.4x);l(b.31(e)){8 c.1M(b,U)}})},6p:7(a,b){8 6.2G(a,[$.1G.37({1k:a,4x:b})])}})})(38);',62,398,'||||||this|function|return|||||||||||||if||||settings|var||||validator|name|true|uFDF0|uD7FF||u00A0|uFFEF|uFDCF||uF900|length|optional|extend|messages|element|Please|false|valid|form|enter|each|delete|value|for|errorList|arguments|currentForm|_|method|test|call||elements|toHide|required|in|format|typeof|data|maxlength|message|invalid|else|errorClass|pending|case|add|pendingRequest|rules|showErrors|trim|type|successList|filter|toShow|submitted|url|delegate|date|errorMap|attr|checkable|formSubmitted|string|input|minlength|console|max|min|number|metadata|success|validate|event|da|not|normalizeRule|email|reset|apply|getLength|digits|errorsFor|classRuleSettings|x09|unhighlight|split|submitButton|addClass|mismatch|dependency|methods|remote|submit|findByName|dateISO|currentElements|validClass||groups|replace|select|constructor|check|previousValue|new|bEven|push|numberDE|objectLength|x20|creditcard|depends|rangelength|handle|range|dateDE|containers|debug|switch|wrapper|undefined|removeClass|labelContainer|defaultMessage|focusInvalid|errors|hide|addWrapper|errorLabelContainer|selected|prepareElement|clean|errorElement|prepareForm|triggerHandler|text|submitHandler|ein|dependTypes|break|fn|defaults|ajax|characters|x0d|msie|hideErrors|abort|resetForm|rulesCache|than|browser|Number|param|window|is|old|idOrName|highlight|showLabel|staticRules|fix|jQuery|meta|special|cancelSubmit|handler|parameters|click|catch|focus|html|findLastActive|try|size|lastActive|defaultShowErrors|button|grep|ignoreTitle|ignore|numberOfInvalids|errorContainer|error|checkForm|bind|find|invalidHandler|checkbox|RegExp|radio|nothing|onsubmit|Array|focusout|remove|focusin|on|makeArray|checked|and|val|x0b|x01|x0a|no|x22|accept|attributeRules|port|mode|the|equalTo|classRules|metadataRules|x0c|x7f|normalizeRules|addClassRules|stopRequest|startRequest|depend|option|toLowerCase|nodeName|Sie|null|geben|Bitte|or|errorPlacement|equal|generated|map|invalidElements|show|validElements|init|parent|strong|String|field|customMessage|autoCreateRanges|to|customMetaMessage|id|errorContext|findDefined|target|formatAndAdd|lastElement|between|assigned|has|disabled|onfocusout|image|removeAttrs|cancel|visible|blockFocusCleanup|focusCleanup|can|onfocusin|label|textarea|file|password|slice|keyup|valueCache|removeEventListener|unshift|teardown|addEventListener|setup|prototype|blur|ajaxSettings|match|greater|gif|jpe|appendTo|warn|png|parseInt|charAt|Date|NaN|less|Invalid|uF8FF|uE000|long|https|x5d|unchecked|least|x21|at|filled|x1f|x0e|x08|more|blank|expr|extension|with|hidden|json|again|dataType|same|default|specified|attributes|card|credit|multiple|addMethod|only|isFunction|524288|Nummer|2147483647|class|eine|x23|x5b|previous|x7e|Datum|ftp|boolean|ltiges|preventDefault|gÃ|getElementsByName|document|insertAfter|append|ISO|wrap|URL|address|defined|No|Warning|title|This|setDefaults|returning|throw|checking|when|occured|exception|log|onclick|continue|onkeyup|removeAttr|triggerEvent'.split('|'),0,{}))

/***************************** /home/common/js/jquery/cmxforms.js **********************************************/

// apply inline-box only for mozilla
if( jQuery.browser.mozilla ) {
	// do when DOM is ready
	$( function() {
		// search form, hide it, search labels to modify, filter classes nocmx and error
		$( 'form.cmxform' ).hide().find( 'p/label:not(.nocmx):not(.error)' ).each( function() {
			var $this = $(this);
			var labelContent = $this.html();
			var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
			// create block element with width of label
			var labelSpan = $("<span>")
				.css("display", "block")
				.width(labelWidth)
				.html(labelContent);
			// change display to mozilla specific inline-box
			$this.css("display", "-moz-inline-box")
				// remove children
				.empty()
				// add span element
				.append(labelSpan);
		// show form again
		}).end().show();
	});
};

/***************************** /home/clary60/public_html/_templates/_js/header.js **********************************************/

$(document).ready(function(){		
	
	dropdown_create('#criteria_menu');
	
});

/***************************** /home/clary60/public_html/_templates/_js/site.js **********************************************/

$(document).ready(function(){
	
	// code common to all pages of site except cart pages,  comes here
	
	// page specific code
	switch(page)
	{
		case "videos":
		
		case "contact_us":
		case "static":
		case "help":
		case "product_list":
		case "product":
			adjust_panel_height();
		break;
		
		case "return_policy":
			adjust_panel_height();
			
			$.meta.setType("attr", "validate");
			$("#custInfo").validate();	
			
		break;
		
		
		case "comparison":
			adjust_panel_height();
			$('.comparison').flexigrid({height:'auto',striped:false});
						
		break;	
		
		case "index":
		case "static":
			$('.product_combo').change(function (){
				prod_id = $(this).val();				
				url = this_www_root+'index/product/id/'+prod_id+'/#accessories'
				document.location = url;
			});
		break;
		
	}
	

});

function adjust_panel_height(){
	new_height = $("#middle-right").height();			
	prev_height = $("#panel-left").height();			
	if(prev_height < new_height){
		$("#panel-left").css('height',new_height+'px');	
	}
		
}

/***************************** /home/common/js/jquery/drop-down-menu.js **********************************************/

var timeout    = 500;
var closetimer = 0;
var ddmenuitem = 0;

function dropdown_open()
{  
	dropdown_canceltimer();
   	dropdown_close();
   	//ddmenuitem = $(this).find('ul').css('visibility', 'visible');
   	ddmenuitem = $(this).find('ul').css('display', 'block');
}

function dropdown_close()
{  
	//if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');
	if(ddmenuitem) ddmenuitem.css('display', 'none');
}

function dropdown_timer()
{  
	closetimer = window.setTimeout(dropdown_close, timeout);
}

function dropdown_canceltimer()
{  
	if(closetimer)
   	{  
   		window.clearTimeout(closetimer);
      	closetimer = null;
   	}
}


function dropdown_create(menu_ul)
{
	$(menu_ul+' > li').bind('mouseover', dropdown_open)
   	$(menu_ul+' > li').bind('mouseout',  dropdown_timer)
}


document.onclick = dropdown_close;
