
/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/jquery.json-2.2.min.js */

(function($){$.toJSON=function(o)
{if(typeof(JSON)=='object'&&JSON.stringify)
return JSON.stringify(o);var type=typeof(o);if(o===null)
return"null";if(type=="undefined")
return undefined;if(type=="number"||type=="boolean")
return o+"";if(type=="string")
return $.quoteString(o);if(type=='object')
{if(typeof o.toJSON=="function")
return $.toJSON(o.toJSON());if(o.constructor===Date)
{var month=o.getUTCMonth()+1;if(month<10)month='0'+month;var day=o.getUTCDate();if(day<10)day='0'+day;var year=o.getUTCFullYear();var hours=o.getUTCHours();if(hours<10)hours='0'+hours;var minutes=o.getUTCMinutes();if(minutes<10)minutes='0'+minutes;var seconds=o.getUTCSeconds();if(seconds<10)seconds='0'+seconds;var milli=o.getUTCMilliseconds();if(milli<100)milli='0'+milli;if(milli<10)milli='0'+milli;return'"'+year+'-'+month+'-'+day+'T'+
hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
if(o.constructor===Array)
{var ret=[];for(var i=0;i<o.length;i++)
ret.push($.toJSON(o[i])||"null");return"["+ret.join(",")+"]";}
var pairs=[];for(var k in o){var name;var type=typeof k;if(type=="number")
name='"'+k+'"';else if(type=="string")
name=$.quoteString(k);else
continue;if(typeof o[k]=="function")
continue;var val=$.toJSON(o[k]);pairs.push(name+":"+val);}
return"{"+pairs.join(", ")+"}";}};$.evalJSON=function(src)
{if(typeof(JSON)=='object'&&JSON.parse)
return JSON.parse(src);return eval("("+src+")");};$.secureEvalJSON=function(src)
{if(typeof(JSON)=='object'&&JSON.parse)
return JSON.parse(src);var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered))
return eval("("+src+")");else
throw new SyntaxError("Error parsing JSON, source is not valid.");};$.quoteString=function(string)
{if(string.match(_escapeable))
{return'"'+string.replace(_escapeable,function(a)
{var c=_meta[a];if(typeof c==='string')return c;c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
return'"'+string+'"';};var _escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var _meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};})(jQuery);

/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/glossary.js */
/**
 * This javascript is called by database generated JQuery configuration
 * options to apply glossary terms defined in the database as fancy rollover
 * tool tips.
 *
 * Based on:
 *  simpleTooltip jQuery plugin, by Marius ILIE
 *  visit http://dev.mariusilie.net for details
 *
 * @package sfPropelGlossaryToolTipPlugin
 * @author Robert Powell
 */
(function($){ $.fn.sfGlossaryToolTip = function()
{
	return this.each(function() {
		var title = $(this).attr("title");
		$(this).attr("title", "");
		$(this).attr("class", "glossaryTerm");

		if(title != undefined) {
			$(this).hover(function(e){
				var tipX = e.pageX + 12;
				var tipY = e.pageY + 12;
				$(this).attr("title", "");
				$("body").append("<div id='glossaryToolTip' class='markup' style='position: absolute; z-index: 3001; display: none;'>" + title + "</div>");
				if($.browser.msie) var tipWidth = $("#glossaryToolTip").outerWidth(true)
				else var tipWidth = $("#glossaryToolTip").width()
				$("#glossaryToolTip").width(tipWidth);
				$("#glossaryToolTip").css("left", tipX).css("top", tipY).fadeIn("medium");
			}, function(){
				$("#glossaryToolTip").remove();
				$(this).attr("title", title);
			});
			$(this).mousemove(function(e){
				var tipX = e.pageX + 12;
				var tipY = e.pageY + 12;
				var tipWidth = $("#glossaryToolTip").outerWidth(true);
				var tipHeight = $("#glossaryToolTip").outerHeight(true);
				if(tipX + tipWidth > $(window).scrollLeft() + $(window).width()) tipX = e.pageX - tipWidth;
				if($(window).height()+$(window).scrollTop() < tipY + tipHeight) tipY = e.pageY - tipHeight;
				$("#glossaryToolTip").css("left", tipX).css("top", tipY).fadeIn("medium");
			});
		}
	});
}})(jQuery);

/**
 * Removes tool tips from elements which are configured
 * not to have tooltips in the admin tool.
 */
(function($){ $.fn.sfGlossaryToolTipRemove = function(){
	return this.each(function() {
    $(this).before($(this)[0].innerHTML).remove();
	});
}})(jQuery);

$(document).ready(function () {
	$(".tooltip").sfGlossaryToolTip();
});

/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/jquery_combined_plugins.js */
/* Copyright (c) 2009 Alexandre Plennevaux (alexandre AT pixeline DOT be || http://www.pixeline.be)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
* 
* See http://www.pixeline.be/experiments/simplyTabs/
*/

/**
Creates a tabbed interface out of a link of in-page anchors. 
If the anchor's target element does not exist, the tab is not created.

In order to achive the "tabbification", the plugin simply uses css classes. The css styling takes care of showing/ hiding. So that the designers can do most (if not all) of the tweaking inside the CSS stylesheet.

Designed for minimal fuzz.

Look 'n feel: A basic CSS is provided but you can customize the look completely.

* @example jQuery('#tabbedContainer').simplyTabs();
* @name simplyTabs
* @version r1 _ 01.03.2009
* @type jQuery
* @param Object	settings	hash with options, described below.
*		tabsNavMenuSelector - class of the menu to be used for the tabs detection & navigation (default : 'ul.tabsNavMenu' )
*       tabsNavMenuClass - class given to the tabs navigation menu (default: 'tab-menu')
*       tabsPanelClass - class given to the tab panels (default: 'tab-panel')
*       tabsNavMenuItemClass - class given to the menu items anchor elements (default: 'tab-menu-item')
*       visibleTabClass - class given to the active tab (default: 'tab-visible')
*       invisibleTabClass - class given to the inactive tabs ( default: 'tab-hidden')
*       selectedTab - tab selected on launch - 0-based, according to the anchor order in the html markup. (default: 0 (first tab))
*       selectedTabClass - class given to the active tab (default: 'tab-menu-item-selected')
*       onShow - callback function triggered after a tab is displayed (default: null)
*
* @return jQuery
* @cat Plugins/simplyTabs
* @author Alexandre Plennevaux (alexandre AT pixeline DOT be || http://www.pixeline.be)
* 
* @modified by John C. Scott
* @modified 9/8/2009
*/
(function($)
{
    $.fn.simplyTabs = function(options)
    {
        // build main options before element iteration
        var opts = $.extend({}, $.fn.simplyTabs.defaults, options);
        // iterate and reformat each matched element
        return this.each(function()
        {

            var $tabContainer = $(this).addClass('tabs');
            // build element specific options
            var o = $.meta ? $.extend({}, opts, $tabContainer.data()) : opts;

            if ($(o.tabsNavMenuSelector, $tabContainer).length > 0)
            {
                var $menu = $(o.tabsNavMenuSelector);
                $menu.addClass(o.tabsNavMenuClass);
                $('a', $menu).addClass(o.tabsNavMenuItemClass).each(function(index)
                {
                    var $thisMenuItem = $(this);
                    // check if this anchor targets an existing identifier
                    var panelSelector = this.hash;
                    var $panel = $(panelSelector);
                    if ($panel.length)
                    {
                        // if so, turn the element into a tab panel
                        $panel.addClass(o.tabsPanelClass);
                        // ... the link into a tab activator
                        $thisMenuItem.addClass(o.tabsNavMenuItemClass);
                        if (index == o.selectedTab)
                        {
                            $panel.addClass(o.visibleTabClass);
                            $thisMenuItem.addClass(o.selectedTabClass);
                        } else
                        {
                            $panel.addClass(o.invisibleTabClass);
                        }
                    }
                });
                // then assign tab (des)activation behavior to anchors
                $('a.' + o.tabsNavMenuItemClass).bind('click.tabs', function(e)
                {
                    e.preventDefault();
                    var $this = $(this);
                    // switch panel
                    var selectedPanel = this.hash;

                    var $tabContainer = $(this).parents('.' + o.tabsWrapper);
                    $('.' + o.tabsPanelClass, $tabContainer).removeClass(o.visibleTabClass).addClass(o.invisibleTabClass);
                    $(selectedPanel).addClass(o.visibleTabClass);
                    // update menu
                    $('a.' + o.tabsNavMenuItemClass, $tabContainer).removeClass(o.selectedTabClass);
                    $this.addClass(o.selectedTabClass);

                    if (jQuery.isFunction(o.onShow))
                    {
                        o.onShow.apply(this);
                    }
                });
            }
        });
    };

    //
    // plugin defaults
    //
    $.fn.simplyTabs.defaults = {
        tabsNavMenuSelector: 'ul.tabsNavMenu',
        tabsWrapper: 'tabs-wrapper',
        tabsNavMenuClass: 'tab-menu', 
        tabsPanelClass: 'tab-panel', 
        tabsNavMenuItemClass: 'tab-menu-item', 
        visibleTabClass: 'tab-visible', 
        invisibleTabClass: 'tab-hidden', 
        selectedTab: 0, 
        selectedTabClass: 'tab-menu-item-selected', 
        onShow: null
    };
    //
    // end of closure
    //
})(jQuery);

/**
 * Supersleight jQuery Plugin for Transparent PNGs in IE6
 * 
 * http://allinthehead.com/retro/338/supersleight-jquery-plugin
 * author: Drew McLellan
 * 
 * 12 March 2009
 * 
 * You apply it to a section of the page like this:
 * 
 * $('#content').supersleight();
 * 
 * Of course, if you wanted to fix PNGs for the entire page, you can just 
 * apply it to the body element. For all sorts of reasons, it’s better to be 
 * specific if you can.
 * 
 * $('body').supersleight();
 * 
 * This can be safely reapplied after importing a chunk of HTML via an Ajax request 
 * (something I end up doing a lot), and it uses jQuery’s browser detection to only 
 * apply it to the appropriate versions of IE, so it’s safe to deploy for everything, 
 * or to include inside some Conditional Comments as you prefer.
 * 
 * As always, the script requires the path to a transparent GIF shim image. By default, 
 * and almost by tradition with this script, that’s x.gif, but you can specify any 
 * image you like:
 * 
 * $('body').supersleight({shim: '/img/transparent.gif'});
 * 
 * Other possible configuration values are imgs and backgrounds (both boolean, 
 * default true) to tell the script which PNGs to fix up, and apply_positioning (boolean, 
 * default true) to tell the script not to try and fix up some of the bugs around 
 * unclickable links. (See the 24ways article (http://24ways.org/2007/supersleight-transparent-png-in-ie6) 
 * for more info on that).
 */
(function($){
	jQuery.fn.supersleight = function(settings) {
		settings = jQuery.extend({
			imgs: true,
			backgrounds: true,
			shim: '/images/spacer.gif',
			apply_positioning: true
		}, settings);
		
		return this.each(function(){
			if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7 && parseInt(jQuery.browser.version, 10) > 4) {
				jQuery(this).find('*').andSelf().each(function(i,obj) {
					var self = jQuery(obj);
					// background pngs
					if (settings.backgrounds && self.css('background-image').match(/\.png/i) !== null) {
						var bg = self.css('background-image');
						var src = bg.substring(5,bg.length-2);
						var mode = (self.css('background-repeat') == 'no-repeat' ? 'crop' : 'scale');
						var styles = {
							'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='" + mode + "')",
							'background-image': 'url('+settings.shim+')'
						};
						self.css(styles);
					};
					// image elements
					if (settings.imgs && self.is('img[src$=png]')){
						var styles = {
							'width': self.width() + 'px',
							'height': self.height() + 'px',
							'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + self.attr('src') + "', sizingMethod='scale')"
						};
						self.css(styles).attr('src', settings.shim);
					};
					// apply position to 'active' elements
					if (settings.apply_positioning && self.is('a, input') && (self.css('position') === '' || self.css('position') == 'static')){
						self.css('position', 'relative');
					};
				});
			};
		});
	};
})(jQuery);

/*
 * jqModal - Minimalist Modaling with jQuery
 *   (http://dev.iceburg.net/jquery/jqModal/)
 *
 * Copyright (c) 2007,2008 Brice Burgess <bhb@iceburg.net>
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 * 
 * $Version: 03/01/2009 +r14
 */
(function($) {
$.fn.jqm=function(o){
var p={
overlay: 50,
overlayClass: 'jqmOverlay',
closeClass: 'jqmClose',
trigger: '.jqModal',
ajax: F,
ajaxText: '',
target: F,
modal: F,
toTop: F,
onShow: F,
onHide: F,
onLoad: F
};
return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;
H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};
if(p.trigger)$(this).jqmAddTrigger(p.trigger);
});};

$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');};
$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};
$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});};
$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});};

$.jqm = {
hash:{},
open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);
 if(c.modal) {if(!A[0])L('bind');A.push(s);}
 else if(c.overlay > 0)h.w.jqmAddClose(o);
 else o=F;

 h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;
 if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}

 if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u;
  r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
 else if(cc)h.w.jqmAddClose($(cc,h.w));

 if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);	
 (c.onShow)?c.onShow(h):h.w.show();e(h);return F;
},
close:function(s){var h=H[s];if(!h.a)return F;h.a=F;
 if(A[0]){A.pop();if(!A[0])L('unbind');}
 if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();
 if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F;
},
params:{}};
var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false,
i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),
e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);},
f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}},
L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},
m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;},
hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() {
 if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});};
})(jQuery);


/*
 * jQuery Form Plugin
 * version: 2.28 (10-MAY-2009)
 * @requires jQuery v1.2.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
;(function($) {

/*
    Usage Note:
    -----------
    Do not use both ajaxSubmit and ajaxForm on the same form.  These
    functions are intended to be exclusive.  Use ajaxSubmit if you want
    to bind your own submit handler to the form.  For example,

    $(document).ready(function() {
        $('#myForm').bind('submit', function() {
            $(this).ajaxSubmit({
                target: '#output'
            });
            return false; // <-- important!
        });
    });

    Use ajaxForm when you want the plugin to manage all the event binding
    for you.  For example,

    $(document).ready(function() {
        $('#myForm').ajaxForm({
            target: '#output'
        });
    });

    When using ajaxForm, the ajaxSubmit function will be invoked for you
    at the appropriate time.
*/

/**
 * ajaxSubmit() provides a mechanism for immediately submitting
 * an HTML form using AJAX.
 */
$.fn.ajaxSubmit = function(options) {
    // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
    if (!this.length) {
        log('ajaxSubmit: skipping submit process - no element selected');
        return this;
    }

    if (typeof options == 'function')
        options = { success: options };

    var url = $.trim(this.attr('action'));
    if (url) {
	    // clean url (don't include hash vaue)
	    url = (url.match(/^([^#]+)/)||[])[1];
   	}
   	url = url || window.location.href || ''

    options = $.extend({
        url:  url,
        type: this.attr('method') || 'GET'
    }, options || {});

    // hook for manipulating the form data before it is extracted;
    // convenient for use with rich editors like tinyMCE or FCKEditor
    var veto = {};
    this.trigger('form-pre-serialize', [this, options, veto]);
    if (veto.veto) {
        log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
        return this;
    }

    // provide opportunity to alter form data before it is serialized
    if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
        log('ajaxSubmit: submit aborted via beforeSerialize callback');
        return this;
    }

    var a = this.formToArray(options.semantic);
    if (options.data) {
        options.extraData = options.data;
        for (var n in options.data) {
          if(options.data[n] instanceof Array) {
            for (var k in options.data[n])
              a.push( { name: n, value: options.data[n][k] } );
          }
          else
             a.push( { name: n, value: options.data[n] } );
        }
    }

    // give pre-submit callback an opportunity to abort the submit
    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
        log('ajaxSubmit: submit aborted via beforeSubmit callback');
        return this;
    }

    // fire vetoable 'validate' event
    this.trigger('form-submit-validate', [a, this, options, veto]);
    if (veto.veto) {
        log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
        return this;
    }

    var q = $.param(a);

    if (options.type.toUpperCase() == 'GET') {
        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
        options.data = null;  // data is null for 'get'
    }
    else
        options.data = q; // data is the query string for 'post'

    var $form = this, callbacks = [];
    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });

    // perform a load on the target only if dataType is not provided
    if (!options.dataType && options.target) {
        var oldSuccess = options.success || function(){};
        callbacks.push(function(data) {
            $(options.target).html(data).each(oldSuccess, arguments);
        });
    }
    else if (options.success)
        callbacks.push(options.success);

    options.success = function(data, status) {
        for (var i=0, max=callbacks.length; i < max; i++)
            callbacks[i].apply(options, [data, status, $form]);
    };

    // are there files to upload?
    var files = $('input:file', this).fieldValue();
    var found = false;
    for (var j=0; j < files.length; j++)
        if (files[j])
            found = true;

	var multipart = false;
//	var mp = 'multipart/form-data';
//	multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);

    // options.iframe allows user to force iframe mode
   if (options.iframe || found || multipart) {
       // hack to fix Safari hang (thanks to Tim Molendijk for this)
       // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
       if (options.closeKeepAlive)
           $.get(options.closeKeepAlive, fileUpload);
       else
           fileUpload();
       }
   else
       $.ajax(options);

    // fire 'notify' event
    this.trigger('form-submit-notify', [this, options]);
    return this;


    // private function for handling file uploads (hat tip to YAHOO!)
    function fileUpload() {
        var form = $form[0];

        if ($(':input[name=submit]', form).length) {
            alert('Error: Form elements must not be named "submit".');
            return;
        }

        var opts = $.extend({}, $.ajaxSettings, options);
		var s = $.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts);

        var id = 'jqFormIO' + (new Date().getTime());
        var $io = $('<iframe id="' + id + '" name="' + id + '" src="about:blank" />');
        var io = $io[0];

        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });

        var xhr = { // mock object
            aborted: 0,
            responseText: null,
            responseXML: null,
            status: 0,
            statusText: 'n/a',
            getAllResponseHeaders: function() {},
            getResponseHeader: function() {},
            setRequestHeader: function() {},
            abort: function() {
                this.aborted = 1;
                $io.attr('src','about:blank'); // abort op in progress
            }
        };

        var g = opts.global;
        // trigger ajax global events so that activity/block indicators work like normal
        if (g && ! $.active++) $.event.trigger("ajaxStart");
        if (g) $.event.trigger("ajaxSend", [xhr, opts]);

		if (s.beforeSend && s.beforeSend(xhr, s) === false) {
			s.global && $.active--;
			return;
        }
        if (xhr.aborted)
            return;

        var cbInvoked = 0;
        var timedOut = 0;

        // add submitting element to data if we know it
        var sub = form.clk;
        if (sub) {
            var n = sub.name;
            if (n && !sub.disabled) {
                options.extraData = options.extraData || {};
                options.extraData[n] = sub.value;
                if (sub.type == "image") {
                    options.extraData[name+'.x'] = form.clk_x;
                    options.extraData[name+'.y'] = form.clk_y;
                }
            }
        }

        // take a breath so that pending repaints get some cpu time before the upload starts
        setTimeout(function() {
            // make sure form attrs are set
            var t = $form.attr('target'), a = $form.attr('action');

			// update form attrs in IE friendly way
			form.setAttribute('target',id);
			if (form.getAttribute('method') != 'POST')
				form.setAttribute('method', 'POST');
			if (form.getAttribute('action') != opts.url)
				form.setAttribute('action', opts.url);

            // ie borks in some cases when setting encoding
            if (! options.skipEncodingOverride) {
                $form.attr({
                    encoding: 'multipart/form-data',
                    enctype:  'multipart/form-data'
                });
            }

            // support timout
            if (opts.timeout)
                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);

            // add "extra" data to form if provided in options
            var extraInputs = [];
            try {
                if (options.extraData)
                    for (var n in options.extraData)
                        extraInputs.push(
                            $('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
                                .appendTo(form)[0]);

                // add iframe to doc and submit the form
                $io.appendTo('body');
                io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
                form.submit();
            }
            finally {
                // reset attrs and remove "extra" input elements
				form.setAttribute('action',a);
                t ? form.setAttribute('target', t) : $form.removeAttr('target');
                $(extraInputs).remove();
            }
        }, 10);

        var nullCheckFlag = 0;

        function cb() {
            if (cbInvoked++) return;

            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);

            var ok = true;
            try {
                if (timedOut) throw 'timeout';
                // extract the server response from the iframe
                var data, doc;

                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;

                if ((doc.body == null || doc.body.innerHTML == '') && !nullCheckFlag) {
                    // in some browsers (cough, Opera 9.2.x) the iframe DOM is not always traversable when
                    // the onload callback fires, so we give them a 2nd chance
                    nullCheckFlag = 1;
                    cbInvoked--;
                    setTimeout(cb, 100);
                    return;
                }

                xhr.responseText = doc.body ? doc.body.innerHTML : null;
                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
                xhr.getResponseHeader = function(header){
                    var headers = {'content-type': opts.dataType};
                    return headers[header];
                };

                if (opts.dataType == 'json' || opts.dataType == 'script') {
                    var ta = doc.getElementsByTagName('textarea')[0];
                    xhr.responseText = ta ? ta.value : xhr.responseText;
                }
                else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
                    xhr.responseXML = toXml(xhr.responseText);
                }
                data = $.httpData(xhr, opts.dataType);
            }
            catch(e){
                ok = false;
                $.handleError(opts, xhr, 'error', e);
            }

            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
            if (ok) {
                opts.success(data, 'success');
                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
            }
            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
            if (g && ! --$.active) $.event.trigger("ajaxStop");
            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');

            // clean up
            setTimeout(function() {
                $io.remove();
                xhr.responseXML = null;
            }, 100);
        };

        function toXml(s, doc) {
            if (window.ActiveXObject) {
                doc = new ActiveXObject('Microsoft.XMLDOM');
                doc.async = 'false';
                doc.loadXML(s);
            }
            else
                doc = (new DOMParser()).parseFromString(s, 'text/xml');
            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
        };
    };
};

/**
 * ajaxForm() provides a mechanism for fully automating form submission.
 *
 * The advantages of using this method instead of ajaxSubmit() are:
 *
 * 1: This method will include coordinates for <input type="image" /> elements (if the element
 *    is used to submit the form).
 * 2. This method will include the submit element's name/value data (for the element that was
 *    used to submit the form).
 * 3. This method binds the submit() method to the form for you.
 *
 * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
 * passes the options argument along after properly binding events for submit elements and
 * the form itself.
 */
$.fn.ajaxForm = function(options) {
    return this.ajaxFormUnbind().bind('submit.form-plugin',function() {
        $(this).ajaxSubmit(options);
        return false;
    }).each(function() {
        // store options in hash
        $(":submit,input:image", this).bind('click.form-plugin',function(e) {
            var form = this.form;
            form.clk = this;
            if (this.type == 'image') {
                if (e.offsetX != undefined) {
                    form.clk_x = e.offsetX;
                    form.clk_y = e.offsetY;
                } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
                    var offset = $(this).offset();
                    form.clk_x = e.pageX - offset.left;
                    form.clk_y = e.pageY - offset.top;
                } else {
                    form.clk_x = e.pageX - this.offsetLeft;
                    form.clk_y = e.pageY - this.offsetTop;
                }
            }
            // clear form vars
            setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 10);
        });
    });
};

// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
$.fn.ajaxFormUnbind = function() {
    this.unbind('submit.form-plugin');
    return this.each(function() {
        $(":submit,input:image", this).unbind('click.form-plugin');
    });

};

/**
 * formToArray() gathers form element data into an array of objects that can
 * be passed to any of the following ajax functions: $.get, $.post, or load.
 * Each object in the array has both a 'name' and 'value' property.  An example of
 * an array for a simple login form might be:
 *
 * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 *
 * It is this array that is passed to pre-submit callback functions provided to the
 * ajaxSubmit() and ajaxForm() methods.
 */
$.fn.formToArray = function(semantic) {
    var a = [];
    if (this.length == 0) return a;

    var form = this[0];
    var els = semantic ? form.getElementsByTagName('*') : form.elements;
    if (!els) return a;
    for(var i=0, max=els.length; i < max; i++) {
        var el = els[i];
        var n = el.name;
        if (!n) continue;

        if (semantic && form.clk && el.type == "image") {
            // handle image inputs on the fly when semantic == true
            if(!el.disabled && form.clk == el) {
            	a.push({name: n, value: $(el).val()});
                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
            }
            continue;
        }

        var v = $.fieldValue(el, true);
        if (v && v.constructor == Array) {
            for(var j=0, jmax=v.length; j < jmax; j++)
                a.push({name: n, value: v[j]});
        }
        else if (v !== null && typeof v != 'undefined')
            a.push({name: n, value: v});
    }

    if (!semantic && form.clk) {
        // input type=='image' are not found in elements array! handle it here
        var $input = $(form.clk), input = $input[0], n = input.name;
        if (n && !input.disabled && input.type == 'image') {
        	a.push({name: n, value: $input.val()});
            a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
        }
    }
    return a;
};

/**
 * Serializes form data into a 'submittable' string. This method will return a string
 * in the format: name1=value1&amp;name2=value2
 */
$.fn.formSerialize = function(semantic) {
    //hand off to jQuery.param for proper encoding
    return $.param(this.formToArray(semantic));
};

/**
 * Serializes all field elements in the jQuery object into a query string.
 * This method will return a string in the format: name1=value1&amp;name2=value2
 */
$.fn.fieldSerialize = function(successful) {
    var a = [];
    this.each(function() {
        var n = this.name;
        if (!n) return;
        var v = $.fieldValue(this, successful);
        if (v && v.constructor == Array) {
            for (var i=0,max=v.length; i < max; i++)
                a.push({name: n, value: v[i]});
        }
        else if (v !== null && typeof v != 'undefined')
            a.push({name: this.name, value: v});
    });
    //hand off to jQuery.param for proper encoding
    return $.param(a);
};

/**
 * Returns the value(s) of the element in the matched set.  For example, consider the following form:
 *
 *  <form><fieldset>
 *      <input name="A" type="text" />
 *      <input name="A" type="text" />
 *      <input name="B" type="checkbox" value="B1" />
 *      <input name="B" type="checkbox" value="B2"/>
 *      <input name="C" type="radio" value="C1" />
 *      <input name="C" type="radio" value="C2" />
 *  </fieldset></form>
 *
 *  var v = $(':text').fieldValue();
 *  // if no values are entered into the text inputs
 *  v == ['','']
 *  // if values entered into the text inputs are 'foo' and 'bar'
 *  v == ['foo','bar']
 *
 *  var v = $(':checkbox').fieldValue();
 *  // if neither checkbox is checked
 *  v === undefined
 *  // if both checkboxes are checked
 *  v == ['B1', 'B2']
 *
 *  var v = $(':radio').fieldValue();
 *  // if neither radio is checked
 *  v === undefined
 *  // if first radio is checked
 *  v == ['C1']
 *
 * The successful argument controls whether or not the field element must be 'successful'
 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.  If this value is false the value(s)
 * for each element is returned.
 *
 * Note: This method *always* returns an array.  If no valid value can be determined the
 *       array will be empty, otherwise it will contain one or more values.
 */
$.fn.fieldValue = function(successful) {
    for (var val=[], i=0, max=this.length; i < max; i++) {
        var el = this[i];
        var v = $.fieldValue(el, successful);
        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
            continue;
        v.constructor == Array ? $.merge(val, v) : val.push(v);
    }
    return val;
};

/**
 * Returns the value of the field element.
 */
$.fieldValue = function(el, successful) {
    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
    if (typeof successful == 'undefined') successful = true;

    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
        (t == 'checkbox' || t == 'radio') && !el.checked ||
        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
        tag == 'select' && el.selectedIndex == -1))
            return null;

    if (tag == 'select') {
        var index = el.selectedIndex;
        if (index < 0) return null;
        var a = [], ops = el.options;
        var one = (t == 'select-one');
        var max = (one ? index+1 : ops.length);
        for(var i=(one ? index : 0); i < max; i++) {
            var op = ops[i];
            if (op.selected) {
				var v = op.value;
				if (!v) // extra pain for IE...
                	v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
                if (one) return v;
                a.push(v);
            }
        }
        return a;
    }
    return el.value;
};

/**
 * Clears the form data.  Takes the following actions on the form's input fields:
 *  - input text fields will have their 'value' property set to the empty string
 *  - select elements will have their 'selectedIndex' property set to -1
 *  - checkbox and radio inputs will have their 'checked' property set to false
 *  - inputs of type submit, button, reset, and hidden will *not* be effected
 *  - button elements will *not* be effected
 */
$.fn.clearForm = function() {
    return this.each(function() {
        $('input,select,textarea', this).clearFields();
    });
};

/**
 * Clears the selected form elements.
 */
$.fn.clearFields = $.fn.clearInputs = function() {
    return this.each(function() {
        var t = this.type, tag = this.tagName.toLowerCase();
        if (t == 'text' || t == 'password' || tag == 'textarea')
            this.value = '';
        else if (t == 'checkbox' || t == 'radio')
            this.checked = false;
        else if (tag == 'select')
            this.selectedIndex = -1;
    });
};

/**
 * Resets the form data.  Causes all form elements to be reset to their original value.
 */
$.fn.resetForm = function() {
    return this.each(function() {
        // guard against an input with the name of 'reset'
        // note that IE reports the reset function as an 'object'
        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
            this.reset();
    });
};

/**
 * Enables or disables any matching elements.
 */
$.fn.enable = function(b) {
    if (b == undefined) b = true;
    return this.each(function() {
        this.disabled = !b;
    });
};

/**
 * Checks/unchecks any matching checkboxes or radio buttons and
 * selects/deselects and matching option elements.
 */
$.fn.selected = function(select) {
    if (select == undefined) select = true;
    return this.each(function() {
        var t = this.type;
        if (t == 'checkbox' || t == 'radio')
            this.checked = select;
        else if (this.tagName.toLowerCase() == 'option') {
            var $sel = $(this).parent('select');
            if (select && $sel[0] && $sel[0].type == 'select-one') {
                // deselect all other options
                $sel.find('option').selected(false);
            }
            this.selected = select;
        }
    });
};

// helper fn for console logging
// set $.fn.ajaxSubmit.debug to true to enable debug logging
function log() {
    if ($.fn.ajaxSubmit.debug && window.console && window.console.log)
        window.console.log('[jquery.form] ' + Array.prototype.join.call(arguments,''));
};

})(jQuery);

/*
 * jQuery Vertical Align Plugin
 * usage: $('#example p').vAlign();
 */
(function($){
	$.fn.vAlign = function(){
		return this.each(function(i){
			var ah = $(this).height();
			var ph = $(this).parent().height();
			var mh = (ph - ah) / 2;
			// We don't want a negative number!
			var mh = (mh < 0) ? (mh * -1) : mh;
			$(this).css('margin-top', mh);
		});
	};
})(jQuery);

/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/sitewide_methods.js */
/*
 * This script instantiates sitewide jQuery methods.
 * These methods could bind events to elements, for example.
 */

$(function(){
	/* PNG 24 fun */
	
	// Fixes transparent PNG bug just for IE6 or less.
	// Don't apply to all elements, as other non-transparent images may break.
	// Here we're appling the hack to all dynamic buttons and button elements.
	$('.btn, button, .item-compare').supersleight();

	// Here we're appling the hack to all "PNG24" images.
	$('.PNG24').supersleight({backgrounds: false});

	// Here we're appling the hack to all "tabs".
	$("ul.tabsNavMenu a span, ul.tabsNavMenu a em").supersleight();

	// Converts all support links to toggles
	$('.support-faq-question-link').click(function() { this.parentNode.onclick(); return false; });


	/* New "target" window for XHTML */
	
	//js alternative to target="_blank"
	$('a.new-win').click(function(){window.open(this.href); return false;});


	// Remove default value from input.
	$('.clear-this').focus(function(){
		$(this).val('');
	});

	
	// Let's not submit the search form if nothing's been entered
	var input_def_value = $('#search-for').val();
	$('#search-site').submit(function(){
		var input_value = $('#search-for').val();
		if (input_value == input_def_value || input_value == "") //return false;
			$('#search-for').val('');
		return true;
	});
	
});

/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/popup.js */
$(function() {
	//Create a lightbox content container
	//Target the lightbox-container-content div to hold your content.
	lightboxContainerInit('lightbox-container');

	//css class for default popup implementation
	//will use the anchor's href to popup content
	$('a.lightbox-enable').click(
		function(event) {
			event.preventDefault();
			var url = this.attr('href');
			$.get(
				url,
				function(data) {
					$('#lightbox-container-content').html(data);
					$('#lightbox-container').jqmShow();
				}
			);
		}
	);


	$('a.international-text-popup').click(
		function(event) {
			event.preventDefault();
			var url = this.href;
			$.get(
				url,
				function(data) {
					$('#lightbox-container-content').html(data);
					$('#lightbox-container').addClass('popup-international-text-countries');
					$('#lightbox-container').jqmShow();
				}
			);
		}
	);

	$('a.minute-packages-popup').click(
			function(event) {
				event.preventDefault();
				var url = this.href;
				$.get(
					url,
					function(data) {
						$('#lightbox-container-content').html(data);
						$('#lightbox-container').addClass('popup-minute-packages');
						$('#lightbox-container').jqmShow();
					}
				);
			}
		);


	$('a.policy-popup').click(
		function(event) {
			event.preventDefault();
			var url = this.href;
			$.get(
				url,
				function(data) {
					$('#lightbox-container-content').html(data);
					$('#lightbox-container').addClass('policy-popup');
					$('#lightbox-container').jqmShow();
				}
			);
		}
	);

	$('a.sample-popup').click(
			function(event) {
				event.preventDefault();
				var url = this.href;
				$.get(
					url,
					function(data) {
						$('#lightbox-container-content').html(data);
						$('#lightbox-container').addClass('sample-popup');
						$('#lightbox-container').jqmShow();
					}
				);
			}
		);

});

function lightboxContainerInit(lightbox_container_id) {
	//Create a lightbox content container
	//Target the lightbox-container-content div to hold your content.
	$('body').append('<div id="'+lightbox_container_id+'" class="jqmDialog">' +
		'<div class="jqDrag popup-drag-outer">' +
			'<div class="popup-drag-inner">' +
				'<a href="#" class="jqmClose popup-closer">close</a>' +
			'</div>' +
		'</div>' +
		'<div id="'+lightbox_container_id+'-content" class="clearfix popup-content"></div>' +
		'<div class="popup-bottom-outer">' +
			'<div class="popup-bottom-inner">&nbsp;</div>' +
		'</div>' +
	'</div>');
	$('#'+lightbox_container_id).jqm({
		modal: true,
		onShow: function(hash) {
			//PNG-24 for IE6  supersleight required for buttons in popup.
			//Does not cascade into popup without this.
			$('.btn, button', hash.w).supersleight();
			$('.PNG24', hash.w).supersleight({backgrounds: false});
			hash.w.show();
		},
		onHide: function(hash) {
			hash.w.hide(1, function(){
				hash.c.trigger = null;
				hash.c.ajax = null;
				hash.c.target = null;

				var classes = $(hash.w).attr('class');
				var resetclasses = '';
				var classesarray = classes.split(' ');
				$.each(classesarray,
					function( idx, val ) {
						if (val.indexOf('jqm') == 0) {
							var sp = '';
							if (idx > 0) {sp = ' ' + val;}
							else {sp = val;}
							resetclasses += sp;
						}
					}
				);
				$(hash.w).attr( {'class' : resetclasses} );

				hash.o.remove();

			});
		}
	}).draggable({ handle: '.jqDrag', opacity: 0.5 });
} 

/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/cart.js */
var cartajaxspinner = '<img class="ajax-spinner" src="/images/ajaxspinners/circleball.gif" />';
var ajaxBlockedTmp = null;
var addLOSLastSubmitted = null;
var cartdata = null;

$(function() {

	if (cartDataService != "") {
		$.ajax( {
			type : 'POST',
			url : cartDataService,
			dataType : 'json',
			success : function(jsonobj) {
				cartdata = jsonobj;
				if (cartdata.success) {
					if (typeof (displayMiniCart) != 'undefined')
						displayMiniCart(cartdata);
					if (typeof (displayLocation) != 'undefined')
						displayLocation(cartdata);
					if (typeof (initLivePersonVars) != 'undefined')
						initLivePersonVars(cartdata);
				} else {
					if (typeof (initLivePersonVars) != 'undefined')
						initLivePersonVars( null );
				}
			}
		});
	}


	// Attach zipcode check ajax validation.
	$('a.ajax-shop').click(function(event) {
		var elem = this;

		event.preventDefault();

		//checkShopZip(elem.href);
		checkShopZip(elem);

	});

	//if no URL is set to a button helper, this gets exec
	$('button.ajax-shop').click(function(event) {
		var elem = this;
		event.preventDefault();
		checkShopZip(elem);
	});


	$('.addtocart-submit').click(function(event) {
		event.preventDefault();
		submitAddToCart(this, $(this).parents('form'));
	});

	$('.inline-zip-form').ajaxForm(
					{
				dataType : 'json',
				beforeSubmit : function(formData, jqForm, options) {

					if (ajaxBlocked($(jqForm).find('button')))
						return false;
						},
				success : function(data, statusText, xhr, $form) {
				   if (data.islocationset || data.doRedirect) {
						if (data.redirect) {
							document.location = data.redirect;
						} else {
							document.location.reload(true);
						}
					} else {

						if(data.cities) {
							ajaxUnblock();

							$('input[name=zip]').keyup(function(){
								if($(this).val().length < 5)
								{
									$('.cities').hide();
									$('input[name="city"]').val('');
								}
							});

							if($('.cities.box').length)
							{
								$('.cities.box').remove();
							}

							var options = '<div class="cities box">';

							options += '<input name="city" type="hidden"/>';
							options += '<div class="topleft"><div class="topright">';
							options += '<div class="item-feature-icons-text">Please select your city.</div>';

							//THIS ZIP CODE CITIES
							for(var i = 0; i < data.cities.city.length; i++ )
							{
								options += '<div class="city-item"><a>'+ data.cities.city[i] + ", " + data.cities.state[i] +'</a></div>';
								//options += '<div class="city-item" style="padding: 3px 10px;border-bottom: 1px dotted #999;"><input type="radio" name="city" value="'+ data.cities.city[i] + ", " + data.cities.state[i] +'"/>&nbsp;'+ data.cities.city[i] + ", " + data.cities.state[i] +'</div>';
							}

							//ALL CITIES
							var all_cities = '';
							all_cities += '<option value=""></option>';
							for(var i = 0; i < data.all_cities.length; i++ )
							{
								all_cities += '<option value="' + data.all_cities[i] + '">' + data.all_cities[i] +'</option>';
							}

							options += '<br/><div class="item-feature-icons-text">Or, tell us your city &amp; state:</div>';

							options += '<div class="box-city-state clearfix"><div class="form-input-warning-box">   <div class="form-zipentry-top-outer"><div class="form-zipentry-top-inner"></div></div>   <div class="form-zipentry-content">';

							options += ' <input type="text" class="clear-this input-shadowed input-text-city" name="city-user"/>&nbsp;<select name="state-user" class="input-shadowed">'+ all_cities +'</select>';

							options += '<div class="form-error-input-city-state" style="display: none;"></div>';

												  //warning
							options += '</div>   <div class="form-zipentry-bottom-outer"><div class="form-zipentry-bottom-inner"></div></div>   </div></div>';

							options += '</div></div><div class="bottomleft"><div class="bottomright"></div></div>';

							var classList = xhr[0].className.split(/\s+/);

							if (classList.length > 1) {
								var baseForm = $('.inline-zip-form.' + classList[1]);
							} else {
								var baseForm = $('.inline-zip-form');
							}
							var targetBase = '';
							if(baseForm.find('.item-zip-wrapper-tall').length != 0)
							{
								baseForm.find('.item-zip-wrapper-tall').append(options);
								targetBase = baseForm.find('.item-zip-wrapper-tall');
							}
							else if(baseForm.find('.item-zip-wrapper').length != 0)
							{
								baseForm.find('.item-zip-wrapper').append(options);
								targetBase = baseForm.find('.item-zip-wrapper');
							}
							else //(baseForm.find('.item-zip-right').length != 0)
							{
								baseForm.append(options);
								targetBase = baseForm;
							}


							$('.city-item a').click(function(e){
								//do post
								e.preventDefault();

								ajaxUnblock();

								$('input[name="city"]').val($(this).text());
								baseForm.submit();

							});
							$('select[name="state-user"]').change(function(e){
								$('input[name="zip"]').val(''); //disregard zip code if user enter c/s manually
								$('input[name="city"]').val($('input[name="city-user"]').val()+  ", "+ $(this).val());

								ajaxUnblock();

								baseForm.submit();

							});

							$('input[name="city-user"]').keyup(function(){
								ajaxUnblock();
								$('input[name="city"]').val($(this).val()+  ", "+ $('select[name="state-user"]').val());
							});


						} else {

							ajaxUnblock();

							//if not able to load entered city and state
							if(data.target_item) {
								var target_item = 'zip'; //default
									target_item =  data.target_item;

								$('.form-error-input-' + target_item).fadeOut('normal', function() {
									//$('#form-zipentry').addClass('popup-zipcode-error');
									$('.box-' + target_item).addClass('popup-zipcode-error');
									$('.form-error-input-' + target_item).html(data.message);
									$('.form-error-input-' + target_item).fadeIn();
								});
							} else {  //normal
								//Remove Cities list from DOM when displaying zip response message
								$('.cities').remove();

								$('#lightbox-container-content').html('<h3 class="question-title">We\'re sorry.</h3>' + data.message);
								$('#lightbox-container').addClass('popup-zipcode');
								$('#lightbox-container-content p').addClass('copy');
								$('#lightbox-container-content h4').remove();

								hbxFailedZip(this.data,	'zipsearch_failed');

								$('#lightbox-container').jqmShow();
							}


						}
					}
				}

			});
//////clear values
	function clearZipForm(form)
	{
		if($('form').find('select[name="city"]').length)
		{
			$('form').find('select[name="city"]').remove();

		}
	}


	// does not refresh page
	$('.inline-zip-form2').ajaxForm(
					{
				dataType : 'json',
				beforeSubmit : function(formData, jqForm, options) {
					if (ajaxBlocked($(jqForm).find('button')))
						return false;
						},
				success : function(data) {
							if (data.islocationset || data.doRedirect) {
						if (data.redirect) {
							document.location = data.redirect;
						} else {
							// document.location = document.location;
							// alert('cool man');
							$('#savings-calculator-hidden').submit();
						}
					} else {
						ajaxUnblock();

						$('#lightbox-container-content')
						.html(
								'<h3 class="question-title">We\'re sorry.</h3>' + data.message);
						$('#lightbox-container').addClass(
						'popup-zipcode');
						$('#lightbox-container-content p').addClass(
						'copy');
								$('#lightbox-container-content h4').remove();

						hbxFailedZip(this.data,
						'zipsearch_community_failed');

								$('#lightbox-container').jqmShow();
							}
						}

			});

	$('.jqmClose').click(function() {
		$('#lightbox-container').jqmHide();
	});

	$('.ajax-broadband-servicearea-check').click(function(event) {
		var clicked = this;
		event.preventDefault();
		checkShopZip( clicked, null, checkBroadbandServiceArea );
	});

	$('.ajax-broadband-servicearea-check-skipzip').click(function(event) {
		var clicked = this;
		event.preventDefault();
		checkBroadbandServiceArea( clicked.href );
	});

});

function hbxFailedZip(data, type) {
	var result = data.split(/zip=([\d]{5})/i);
	if (result) {
		var ev1 = new _hbEvent('search');
		ev1.keywords = result[1] ? result[1] : '';
		ev1.results = 0;
		ev1.attt1 = 0;
		ev1.attr2 = type;
		ev1.attr3 = 0;
		_hbSend();
	}

}

function nextStep(clicked) {
	$.ajax( {
		type : 'POST',
		url : nextStepService,
		dataType : 'json',
		beforeSend : function(request) {
			if (ajaxBlocked(clicked))
				return false;
		},
		success : function(jsonobj) {
			document.location = jsonobj.nextURL;
		}
	});
}

function addLOSItem(clicked) {
	submitAddToCart(clicked, $(clicked).parents('form'));
	return false;
}

/**
 * Array of cart items with the following properies:
 *
 * product_id
 * product_name
 * price
 * quantity
 * cm_prod_cat
 * cm_prod_attr
 * @param cartitems
 */
function triggerShopAction5ForCartItems( cartitems ) {
	if ( typeof( cmCreateShopAction5Tag ) == 'function' ) {
		for ( var idx=0; idx < cartitems.length; idx++ ) {
			var item = cartitems[ idx ];
			var cmprodattr = '';
			var attrs = item.cm_prod_attr;
			if ( attrs.length > 0 ) {
				if ( typeof( hbx.mlc ) != 'undefined' ) {
					attrs = rdiCmSetAttr( 6, hbx.mlc, attrs );
				}
				if ( typeof( hbx.pn ) != 'undefined' ) {
					attrs = rdiCmSetAttr( 7, hbx.pn, attrs );
				}
				cmprodattr = rdiCmToAttrString( attrs );
			}
			cmCreateShopAction5Tag( item.product_name, item.product_name, item.quantity, item.price, item.cm_prod_cat, cmprodattr );
		}
		if ( cartitems.length > 0 ) {
			cmDisplayShop5s();
		}
	}
}

function submitAddToCart(clicked, jqForm) {
	jqForm.ajaxSubmit( {
		dataType : 'json',
		beforeSubmit : function(formData, jqForm, options) {
			if (ajaxBlocked(clicked))
				return false;
					addLOSLastSubmitted = jqForm;
				},
		success : function(data) {
					if ( data.success ) {
						if ( data.cartitems && data.cartitems.length > 0 ) {
							/*
							 product_id
						     product_name
						     price
						     cm_prod_cat,
						     cm_prod_attr
						    */
							if (typeof( lpAddVars ) == 'function') {
								var item = data.cartitems[0];
								if (item.product_type == 'phone') {
									lpAddVars('page', 'lpPhoneType', item.product_name);
								} else if (item.product_type == 'plan') {
									lpAddVars('page', 'lpPlanType', item.product_name);
									}
				}

							triggerShopAction5ForCartItems( data.cartitems );
						}

						document.location = data.nextstep;
					} else {
						ajaxUnblock();
				$('.addtocart-submit').click(function(event) {
					event.preventDefault();
					submitAddToCart(this, $(this).parents('form'));
				});
						$('#lightbox-container-content').html(data.message);
						$('#lightbox-container').addClass(data.csspopupclass);
						$('#lightbox-container').jqmShow();
					}
				}
			});
}

//var tempZip = '';
//var tempZipHidden = false;
function popupZipForm(zipformcontent, successurl) {
	$('#lightbox-container-content').html(zipformcontent);
	$('#lightbox-container').addClass('popup-zipcode');

	//Trigger Coremetrics cmCreateElementTag
	if ( typeof( cmCreateElementTag ) == 'function' ) {
		cmCreateElementTag('ENTER ZIP CODE','INTERSTITIALS:ZIP CODE');
	}

	$('#form-zipentry').ajaxForm( {
		dataType : 'json',
		beforeSubmit : function(formData, jqForm, options) {
			if (ajaxBlocked($(jqForm).find('button')))
				return false;
		},
		success : function(data) {
			if (data.islocationset) {

				if (data.message && data.message != '') {
					//A message was supplied in the reponse, so display the message
					//instead of redirecting them.
					$('#lightbox-container-content').html(data.message);

					$('a.jqmClose').click(function(e){
						// Success url is empty. So refresh the
						document.location.reload(true);
					});

				} else {
					//No message in the response. So redirect the user.
					if (successurl != '') {

						//show popup 'we are sorry' - 317 addition - cases isolated
						if(data.is_cricket == false && successurl.indexOf('broadband/devices') > -1 &&
								document.location.href.indexOf('shop') > -1 )
						{
							$('#lightbox-container-content').html(data.error_message);
							//$('#lightbox-container').addClass('short-message-popup');
							$('a.jqmClose').click(function(e){
								// Success url is empty. So refresh the
								document.location.reload(true);
							});

						}else if(data.is_cricket == false && successurl.indexOf('shop/smartphones') > -1 &&
								document.location.href.indexOf('shop') > -1 )
						{
							document.location = '/cell-phones/shop/muve-music-phones';
						}
						else{//anything else - ORIGINAL redirect
						document.location = successurl;
						}
					} else if (data.redirect && data.redirect != '') {
						document.location = data.redirect;
					} else {
						// Success url is empty. So refresh the
						document.location.reload(true);
					}
				}
			} else {

				if(data.cities)
				{
					ajaxUnblock();

					$('#lightbox-container').css('overflow', 'visible');

					$('input[name="zip"]').keyup(function(){
						if($(this).val().length < 5)
						{
							$('.cities').remove();
							$('input[name="city"]').val('');
						}
					});

					//add class
					//var options = '<div style="margin: -5px 0 0 5px;padding: 10px;width: 175px;position:absolute; background-color: #fff;z-index: 9999; border: 1px solid #999;">';

					if($('.cities.box').length)
					{
						$('.cities.box').remove();
					}

					var options = '<div class="cities box">';

					options += '<input name="city" type="hidden"/>';
					options += '<div class="topleft"><div class="topright">';
					options += '<div class="item-feature-icons-text">Please select your city.</div>';

					//THIS ZIP CODE CITIES
					for(var i = 0; i < data.cities.city.length; i++ )
					{
						options += '<div class="city-item"><a>'+ data.cities.city[i] + ", " + data.cities.state[i] +'</a></div>';
						//options += '<div class="city-item" style="padding: 3px 10px;border-bottom: 1px dotted #999;"><input type="radio" name="city" value="'+ data.cities.city[i] + ", " + data.cities.state[i] +'"/>&nbsp;'+ data.cities.city[i] + ", " + data.cities.state[i] +'</div>';
					}

					//ALL CITIES
					var all_cities = '';
					all_cities += '<option value=""></option>';
					for(var i = 0; i < data.all_cities.length; i++ )
					{
						all_cities += '<option value="' + data.all_cities[i] + '">' + data.all_cities[i] +'</option>';
						//options += '<div class="city-item" style="padding: 3px 10px;border-bottom: 1px dotted #999;"><input type="radio" name="city" value="'+ data.cities.city[i] + ", " + data.cities.state[i] +'"/>&nbsp;'+ data.cities.city[i] + ", " + data.cities.state[i] +'</div>';
					}

					options += '<br/><div class="item-feature-icons-text">Or, tell us your city &amp; state:</div>';

					//options += '<div class="box-city-state"><div class="form-input-warning-box"><div class="form-zipentry-top-outer"><div class="form-zipentry-top-inner"></div></div><div class="form-zipentry-content">';//error

					options += '<div class="box-city-state clearfix"><div class="form-input-warning-box">   <div class="form-zipentry-top-outer"><div class="form-zipentry-top-inner"></div></div>   <div class="form-zipentry-content">';

					options += ' <input type="text" class="clear-this input-shadowed input-text-city" name="city-user"/>&nbsp;<select name="state-user" class="input-shadowed">'+ all_cities +'</select>';

					options += '<div class="form-error-input-city-state" style="display: none;"></div>';

										  //warning
					options += '</div>   <div class="form-zipentry-bottom-outer"><div class="form-zipentry-bottom-inner"></div></div>   </div></div>';

				//	options += '</div><div class="form-zipentry-bottom-outer"><div class="form-zipentry-bottom-inner"></div></div>';

					options += '</div></div><div class="bottomleft"><div class="bottomright"></div></div>';

					//options += '<div class="selected-city" style="padding: 2px 10px; margin-top: 40px;width: 175px; position:absolute; background-color: #fff;z-index: 9999; border: 1px solid #999;" >West Linda, CA<span style="padding: 0 5px;font-weight: normal;">[<a>change</a>]</span></div>';

					var baseForm = $('#form-zipentry');
					/*
												var baseForm = $('.inline-zip-form.' + xhr[0].classList[1]);
												var targetBase = '';

												if(baseForm.find('.item-zip-wrapper-tall').length != 0)
												{
													baseForm.find('.item-zip-wrapper-tall').append(options);
													targetBase = baseForm.find('.item-zip-wrapper-tall');
												}
												else if(baseForm.find('.item-zip-wrapper').length != 0)
												{
													baseForm.find('.item-zip-wrapper').append(options);
													targetBase = baseForm.find('.item-zip-wrapper');
												}
												else //(baseForm.find('.item-zip-right').length != 0)
												{
													baseForm.append(options);
													targetBase = baseForm;
												}
					 */

					$('#form-zipentry-content').append(options);

					$('.cities').css('margin-top', '-25px');

					$('#form-zipentry #form-zipentry-content input').css('display', 'inline');
					$('.city-item a').click(function(e){
						//do post
						e.preventDefault();
						$('input[name="city"]').val($(this).text());
						baseForm.submit();
					});
					$('select[name="state-user"]').change(function(e){
						$('input[name="zip"]').val(''); //disregard zip code if user enter c/s manually
						$('input[name="city"]').val($('input[name="city-user"]').val()+  ", "+ $(this).val());
						baseForm.submit();
					});

					$('input[name="city-user"]').keyup(function(){
						$('input[name="city"]').val($(this).val()+  ", "+ $('select[name="state-user"]').val());
					});


				} else if (data.doRedirect) {
					document.location = data.redirect;
				} else {
					ajaxUnblock();

					var target_item = 'zip'; //default

					if(data.target_item)
					{
						target_item =  data.target_item;
					} else {
						//Remove Cities list from DOM when displaying zip response message
						$('.cities').remove();
					}

					$('.form-error-input-' + target_item).fadeOut('normal', function() {
						//$('#form-zipentry').addClass('popup-zipcode-error');
						$('.box-' + target_item).addClass('popup-zipcode-error');
						$('.form-error-input-' + target_item).html(data.message);
						$('.form-error-input-' + target_item).fadeIn();
					});

					hbxFailedZip(this.data, 'zipsearch_shop_failed');
				}
			}
		}

	});

	$('#lightbox-container').jqmShow();
}

function replaceLOSItem(clicked, packageid) {
	$(addLOSLastSubmitted[0]['addmode']).attr( {
		value : packageid
	});
	submitAddToCart(clicked, addLOSLastSubmitted);
}

function newLOSItem(clicked, packagetype) {
	$(addLOSLastSubmitted[0]['packagetype']).attr( {
		value : packagetype
	});
	$(addLOSLastSubmitted[0]['addmode']).attr( {
		value : 'append'
	});
	submitAddToCart(clicked, addLOSLastSubmitted);
}

function setIntention(clicked, packagetype) {
	$(addLOSLastSubmitted[0]['packagetype']).attr( {
		value : packagetype
	});
	appendConfirmStack(addLOSLastSubmitted, 'confirmintention');
	submitAddToCart(clicked, addLOSLastSubmitted);
}

function confirmFringeAddToCart(clicked) {
	appendConfirmStack(addLOSLastSubmitted, 'fringezip');
	submitAddToCart(clicked, addLOSLastSubmitted);
}

function confirmIncompatiblePhoneAddToCart(clicked) {
	appendConfirmStack(addLOSLastSubmitted, 'incompatiblephoneaddtocart');
	submitAddToCart(clicked, addLOSLastSubmitted);
}

function changeIntention(clicked, packagetype) {
	var data = {packageType: packagetype};

	$.ajax( {
		type : 'POST',
		url : changeIntentionService,
		dataType : 'json',
		data : data,
		beforeSend : function(request) {
			if (ajaxBlocked(clicked))
				return false;
		},
		success : function(jsonobj) {
			if (jsonobj.success) {
				document.location = jsonobj.nextstep;
			} else {
				ajaxUnblock();
				$('#lightbox-container-content').html(jsonobj.message);
				$('#lightbox-container').addClass('popup-package-conflict');
				$('#lightbox-container').jqmShow();
			}
		}
	});
}

function appendConfirmStack(jqForm, confirmAction) {
	var confirmstack = $(jqForm[0]['confirmstack']).attr('value');
	confirmstack += (confirmAction + ',');
	$(jqForm[0]['confirmstack']).attr( {
		value : confirmstack
	});
}

function ajaxBlocked(ajaxButton) {
	if ($('.ajax-spinner').length > 0)
		return true;
	ajaxBlockedTmp = $(ajaxButton).replaceWith(cartajaxspinner);
}

function ajaxUnblock() {
	$.each(ajaxBlockedTmp, function(intIndex, objValue) {
		$('.ajax-spinner').replaceWith(objValue);
	});
}

function expireCart() {
	var rdi_cart_date = new Date();
	rdi_cart_date.setTime(rdi_cart_date.getTime() + (-7 * 24 * 60 * 60 * 1000));
	var rdi_cart_expires = "; expires=" + rdi_cart_date.toGMTString();
	document.cookie = "MyCricketCartID=" + rdi_cart_expires
	+ "; path=/; domain=.mycricket.com";
	document.cookie = "data=" + rdi_cart_expires + "; path=/";
	// document.cookie = "ShopPhonesNav=" + rdi_cart_expires + "; path=/";
	// document.cookie = "ShopPlansNav=" + rdi_cart_expires + "; path=/";
	// document.cookie = "ShopBroadbandNav=" + rdi_cart_expires + "; path=/";
	// document.cookie = "ShopBroadbandPlansNav=" + rdi_cart_expires + ";
	// path=/";
	// document.cookie = "ShopFamilyPlansNav=" + rdi_cart_expires + "; path=/";
	// document.cookie = "ShopAccessoriesNav=" + rdi_cart_expires + "; path=/";
}

function showCartError() {
	$('#cart-error-msg').toggle();
}

function showPIASingleLOSInstructions(totoggle) {
	$('#' + totoggle).toggle();
}

function checkShopZip(elem, closecallback, successcallback) {
	var href;
	if(elem.href)
	href = elem.href;
	else
	href = '';

	var popupMode = '';
	if ( $(elem).hasClass('shop-paygo') ) {
		popupMode = 'shop-paygo-learn';
	}
	$.ajax( {
		type : 'POST',
		url : locationCheckService,
		data : {href:href, popupMode: popupMode},
		dataType : 'json',
		success : function(data) {
			var formButton = null;
			if (!data.islocationset) {
				popupZipForm(data.message, href);
				if (typeof(closecallback) == 'function') {
					$('.jqmClose').click( closecallback );
				}
			} else {
				if (typeof(successcallback) == 'function') {
					//console.log('calling successcallback');
					successcallback( href );
				} else {
					document.location = href;
				}
			}
		},
		error : function(request, status, errorThrown) {
			// alert(status + ' ' + locationCheckService);
	}
	});
}

function removeItem(itemid, clicked) {
	$.ajax( {
		type : 'POST',
		url : removeItemService,
		dataType : 'json',
		data: {itemid: itemid},
		beforeSend : function(request) {
			if (ajaxBlocked(clicked))
				return false;
		},
		success : function(data) {
			ajaxUnblock();
			if (data.success) {
				//document.location.reload(true);
				$('#lightbox-container').jqmHide();
			} else {
				$('#lightbox-container-content').html(data.message);
				$('#lightbox-container').addClass(data.csspopupclass);
				$('#lightbox-container').jqmShow();
			}
		},
		error : function(request, status, errorThrown) {
			// alert(status + ' ' + locationCheckService);
		}
	});
}

function checkBroadbandServiceArea(href) {
	$.ajax( {
		type : 'POST',
		url : broadbandServiceAreaCheckService,
		dataType : 'json',
		success : function(data) {

			if (data.isBroadbadServiceArea) {
				if( typeof(href) != 'undefined' ) {
					document.location = href;
				}
			} else {
				//console.log(data.csspopupclass);
				$('#lightbox-container').jqmHide();
				$('#lightbox-container-content').html(data.message);
				$('#lightbox-container').addClass(data.csspopupclass);
				$('#lightbox-container').jqmShow();
			}
		},
		error : function(request, status, errorThrown) {
			// alert(status + ' ' + broadbandServiceAreaCheckService);
		}
	});
}



/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/swfobject2.2.js */
/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();

/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/jquery/jquery.cookie.js */
/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

/* COMBINED: /var/www/mycricket.com/mycricket_com/web/js/motionpoint.js */
var MP = {
<!-- mp_trans_disable_start --> 
  Version: '1.0.22',
  Domains: {'es':'espanol.mycricket.com'},	
  SrcLang: 'en',
<!-- mp_trans_disable_end -->
  UrlLang: 'mp_js_current_lang',
  SrcUrl: unescape('mp_js_orgin_url'),
<!-- mp_trans_disable_start --> 	
  init: function(){
    if (MP.UrlLang.indexOf('p_js_')==1) {
      MP.SrcUrl=window.top.document.location.href;
      MP.UrlLang=MP.SrcLang;
  }
},
getCookie: function(name){
  var start=document.cookie.indexOf(name+'=');
  if(start < 0) return null;
  start=start+name.length+1;
  var end=document.cookie.indexOf(';', start);
  if(end < 0) end=document.cookie.length;
  while (document.cookie.charAt(start)==' '){ start++; }
  return unescape(document.cookie.substring(start,end));
},
setCookie: function(name,value,path,domain){
  var cookie=name+'='+escape(value);
  if(path)cookie+='; path='+path;
  if(domain)cookie+='; domain='+domain;
  var now=new Date();
  now.setTime(now.getTime()+1000*60*60*24*365);
  cookie+='; expires='+now.toUTCString();
  document.cookie=cookie;
},
switchLanguage: function(lang){
  if(lang!=MP.SrcLang){
    var script=document.createElement('SCRIPT');
    script.src=location.protocol+'//'+MP.Domains[lang]+'/'+MP.SrcLang+lang+'/?1023749632;'+encodeURIComponent(MP.SrcUrl);
	document.body.appendChild(script);
  } else if(lang==MP.SrcLang && MP.UrlLang!=MP.SrcLang){
    var script=document.createElement('SCRIPT');
    script.src=location.protocol+'//'+MP.Domains[MP.UrlLang]+'/'+MP.SrcLang+MP.UrlLang+'/?1023749634;'+encodeURIComponent(location.href);
	document.body.appendChild(script);
  }
  return false;
},
switchToLang: function(url) {
  window.top.location.href=url; 
}
<!-- mp_trans_disable_end -->   
};
	
/*
function switchLanguage(lang) {
    MP.SrcUrl=unescape('mp_js_orgin_url');MP.UrlLang='mp_js_current_lang';MP.init();
	MP.switchLanguage(MP.UrlLang==lang?'en':lang);
	return false;
}
*/



