/*
CSS Browser Selector v0.4.0 (Nov 02, 2010)
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);

/*
 * Shorten, a jQuery plugin to automatically shorten text to fit in a block or a pre-set width and configure how the text ends.
 * Copyright (C) 2009-2011  Marc Diethelm
 * License: (GPL 3, http://www.gnu.org/licenses/gpl-3.0.txt) see license.txt
 */

(function(a){function s(g,c){return c.measureText(g).width}function t(g,c){c.text(g);return c.width()}var q=false,o,j,k;a.fn.shorten=function(){var g={},c=arguments,r=c.callee;if(c.length)if(c[0].constructor==Object)g=c[0];else if(c[0]=="options")return a(this).eq(0).data("shorten-options");else g={width:parseInt(c[0]),tail:c[1]};this.css("visibility","hidden");var h=a.extend({},r.defaults,g);return this.each(function(){var e=a(this),d=e.text(),p=d.length,i,f=a("<span/>").html(h.tail).text(),l={shortened:false, textOverflow:false};i=e.css("float")!="none"?h.width||e.width():h.width||e.parent().width();if(i<0)return true;e.data("shorten-options",h);this.style.display="block";this.style.whiteSpace="nowrap";if(o){var b=a(this),n=document.createElement("canvas");ctx=n.getContext("2d");b.html(n);ctx.font=b.css("font-style")+" "+b.css("font-variant")+" "+b.css("font-weight")+" "+Math.ceil(parseFloat(b.css("font-size")))+"px "+b.css("font-family");j=ctx;k=s}else{b=a('<table style="padding:0; margin:0; border:none; font:inherit;width:auto;zoom:1;position:absolute;"><tr style="padding:0; margin:0; border:none; font:inherit;"><td style="padding:0; margin:0; border:none; font:inherit;white-space:nowrap;"></td></tr></table>'); $td=a("td",b);a(this).html(b);j=$td;k=t}b=k.call(this,d,j);if(b<i){e.text(d);this.style.visibility="visible";e.data("shorten-info",l);return true}h.tooltip&&this.setAttribute("title",d);if(r._native&&!g.width){n=a("<span>"+h.tail+"</span>").text();if(n.length==1&&n.charCodeAt(0)==8230){e.text(d);this.style.overflow="hidden";this.style[r._native]="ellipsis";this.style.visibility="visible";l.shortened=true;l.textOverflow="ellipsis";e.data("shorten-info",l);return true}}f=k.call(this,f,j);i-=f;f=i*1.15; if(b-f>0){f=d.substring(0,Math.ceil(p*(f/b)));if(k.call(this,f,j)>i){d=f;p=d.length}}do{p--;d=d.substring(0,p)}while(k.call(this,d,j)>=i);e.html(a.trim(a("<span/>").text(d).html())+h.tail);this.style.visibility="visible";l.shortened=true;e.data("shorten-info",l);return true})};var m=document.documentElement.style;if("textOverflow"in m)q="textOverflow";else if("OTextOverflow"in m)q="OTextOverflow";if(typeof Modernizr!="undefined"&&Modernizr.canvastext)o=Modernizr.canvastext;else{m=document.createElement("canvas"); o=!!(m.getContext&&m.getContext("2d")&&typeof m.getContext("2d").fillText==="function")}a.fn.shorten._is_canvasTextSupported=o;a.fn.shorten._native=q;a.fn.shorten.defaults={tail:"&hellip;",tooltip:true}})(jQuery);;
(function ($) {


/* Attach all theme behaviors */
Drupal.behaviors.rallyTheme = {
    attach: function (context, settings) {
																					
			if($('body').has('#already_use').length == 0 ){
				$('<span id="already_use" style="visibility:hidden;"></span>').appendTo('body');				
				Rally.ctoolsLinks.init(context, settings);
					
				Rally.coroboxOverlay.init(context, settings);
				
        Rally.mainMenu.init(context, settings);

        Rally.sidebarMenu.init(context, settings);

        Rally.feedbackTray.init(context, settings);

        Rally.accordion.init(context, settings);

        Rally.fancyCheckboxes.init(context, settings);
			}
    }
};

// Setup the Rally namespace
Rally = {};

Rally.ctoolsLinks = {
	init: function(context, settings) {
		
		$('.rally_external_link').click(function(){
			$(this).attr('target','_blank');
		});		
					
		var loading_src = window.location.protocol + '//' + window.location.hostname + '/' + 'sites/all/modules/rally_mega_slideshow/images/ajax-loader.gif';
		var w = $(window).width();
		var h = $(window).height();
		var wi = 100;
		var hi = 10;
		var top = (h - hi) / 2;
		var left = (w - wi) / 2;  
		$('.view-playlist, .ctools-modal-ctools-rally-style').click(function() {		
			$('#modalContent').css({'top':($(window).height() - $('#modalContent').height())/2  + 'px'});
			$('.ajax-progress-throbber').css({'float':'right'});
			//$("<div class='loading-throbber' style='z-index:9000;position: absolute; top:" + top + "px; left:" + left + "px;'><img src='" + loading_src + "' /></div>").appendTo('body');
		});

		setTimeout(function(){
			if(window.location.href.indexOf('#')+1){
				var anchor_t = window.location.href.split('#');
				if(anchor_t[1].indexOf('rally-ready-ext-')+1){
					var a_href = anchor_t[1].substr(16);
					$('a[href="' + a_href + '"]').trigger('click');
				}else if(anchor_t[1].indexOf('rally-ready-download-')+1){
					var a_href = anchor_t[1].substr(21);
					window.location.href =  window.location.protocol + '//' + window.location.host + '/' + a_href;
				}else if(anchor_t[1].indexOf('rally-ready-')+1){
					$('a[href="/' + a_href + '?dest=' + anchor_t[0].substr(str_len) + '&ct=rally' + '"]').trigger('click');
				}
			}
		}, 1000);		
				
		var temp_dest = '';
		var current_a = '';
		$('a.ctools-modal-ctools-rally-style, .resource_slideshow_images').click(function(){
			var anchor = $(this).attr('href').split('?');													
			temp_dest = anchor[1];
			$(this).addClass('current-ctools');			
			$(this).attr('rel', anchor[0]);
						
			if(anchor.length == 2){				
				$(this).attr('href', anchor[0]);				
			}			
			return false;
		});		
		
		$('.resource_slideshow_images, .thumbnail_slideshow, .image_single').click(function(){	
			var resource_slideshow_images_id = '';			
			if($(this).hasClass('thumbnail_slideshow')){
				var resource_slideshow_images_id = $(this).attr('id').substr(10);				
			}
			if($(this).hasClass('resource_slideshow_images')){
				var resource_slideshow_images_id = $(this).attr('id');					
			}		
			if($(this).hasClass('image_single')){
				var resource_slideshow_images_id = $(this).attr('id');					
			}			
			$('.' + resource_slideshow_images_id).trigger('click'); 
			return false;
		});
		
	}
}

Rally.coroboxOverlay = {
	init: function(context, settings) {
		$('a.colorbox .colorbox-link').live('click',function(){
			//var baseUrl = Drupal.settings.baseUrl;
			//console.log(Drupal.settings.baseUrl + '/');
			$('#cboxOverlay').css({'opacity':'0.85 !important'});
			$('#cboxLoadedContent, #cboxTitle, #cboxCurrent, #cboxNext, #cboxPrevious').css({'color':'#fff'});
			$('#cboxCurrent').css({'border-left':'1px solid #fff'});
			$('#cboxNext').css({'background':'url(/sites/all/themes/rally/style/i/controls2.png) 0 -29px no-repeat'});
			$('#cboxPrevious').css({'background':'url(/sites/all/themes/rally/style/i/controls2.png) 0 -48px no-repeat'});
			$('#cboxNext').hover(function(){
				$(this).css({'background-position':'0 -92px !important'});
			},function(){
				$(this).css({'background-position':'0 -29px !important'});
			});
			$('#cboxPrevious').hover(function(){
				$(this).css({'background-position':'0 -111px !important'});
			},function(){
				$(this).css({'background-position':'0 -48px !important'});
			});
		});
	}
}

/* Feedback Tray ----------------------------------------------------------- */
Rally.feedbackTray = {


    bar: null,
    content: null,
    speed: 300,
    status: 'closed',
    activeItem: null,

    init: function(context, settings) {
        var self = this;
        self.bar = $('#footer');
        self.content = $('#tray');
        self.activeItem = $('#contact');
        $('.feedback-option', self.content).hide();
        $("#actions a", context).click(
            function (e) {
                e.preventDefault();
		if ($(this).hasClass('trial')) {
			window.location = "/node/395";
		} else {
			var $target = $('#'+ $(this).attr('href').split('#')[1]);
			if (self.status == 'closed') {
			    self.swap($target);
			    self.reveal();
			}
			else {
			    if ($target.is(':visible')) {
				self.hide();
			    }
			    else {
				self.swap($target);
			    }
			}
		}
	    }
            );
	

        self.bar.append('<a href="#" class="toggle">Hide/Show</a>');
        var origHeight = self.bar.height();
        var destHeight = 5;
        $('a.toggle', self.bar).click(
            function (e) {
                e.preventDefault();
                if (self.status == 'open') {
                    self.hide();
                }
                if (self.bar.height() > destHeight) {
                    // Hide
                    self.bar.animate({
                        'height': destHeight
                    }, self.speed);
                    $(this).css({
                        'background-position': '0 -12px'
                    });
                    // Necessary sticky-footer adjustment
                    $('#wrap').animate({
                        'margin-bottom': origHeight - destHeight - 183
                    }, self.speed);
                }
                else {
                    // Show
                    self.bar.animate({
                        'height': origHeight
                    }, self.speed);
                    $(this).css({
                        'background-position': '0 0'
                    });
                    // Necessary sticky-footer adjustment
                    $('#wrap').animate({
                        'margin-bottom': -183
                    }, self.speed);
                }
            }
            );

        // Setup shrink buttons on dropdowns
        Rally.feedbackTray.content.append('<a href="#" class="close">Close</a>');
        $('a.close', Rally.feedbackTray.content).click(function(e){
            e.preventDefault();
            Rally.feedbackTray.hide();
        });
    },

    reveal: function() {
        // Bear with me. Fair amount of layout management required for this animation
        var self = this;
        Rally.feedbackTray.content.animate({
            height: 292
        }, Rally.feedbackTray.speed);
        Rally.feedbackTray.bar.animate({
            bottom: 292
        }, Rally.feedbackTray.speed);
        $('#slip').animate({
            'padding-bottom': 330
        }, Rally.feedbackTray.speed);
        // Focus is nice, but causes nasty layout jump
        // $('input:eq(0)', Rally.feedbackTray.content).focus();
        self.status = 'open';
    },

    hide: function() {
        // Bear with me. Fair amount of layout management required for this animation
        var self = this;
        Rally.feedbackTray.content.animate({
            height: '0'
        }, Rally.feedbackTray.speed);
        Rally.feedbackTray.bar.animate({
            bottom: '0'
        }, Rally.feedbackTray.speed);
        $('#slip').animate({
            'padding-bottom': 0
        }, Rally.feedbackTray.speed);
        self.status = 'closed';
    },

    swap: function($target) {
        var self = this;
        $('.feedback-option', self.content).removeClass('active').hide();
        $target.addClass('active').show();
				$('.active #FirstName').focus();
        self.activeItem = $target;
    }

};

Rally.mainMenu = {
        init: function(context, settings) {				
						
            // Hide/reveal dropdown menus
            var $nav = $('#nav');
            var $element = ''; //dropdowns content on page
						var $padding = 0; //padding for #page but not #feature
            var $page = $('#page'); //page element
            var $feature = $('#feature'); //feature element
            if($('#feature').length == 0){
                $element = $page;
								$padding = 20;
            }else{
                $element = $feature;
								$padding = -2;
            }
            $('a', $nav).click(function(e){
                var id = $(this).text().toLowerCase();
                var array_id = id.split(" "); //get array id if it several words
                if(array_id.length > 1){
                    id = array_id.join("_");
                    //remove "?" >>>
                    var pos = id.indexOf("?");
                    if(pos >= 0){
                        id = id.slice(0,pos) + id.slice(pos+1,id.length);
                    }
                    //<<< remove "?"
                    id = id.replace(new RegExp("&",'g'),'and');  //replace all "&" in string
                }
                var $drop = $('#mini-panel-'+ id +'_dropdown');
                var $padding_top = $drop.innerHeight();
                if ($drop.length) {
                    e.preventDefault();
                    if ($drop.is(':visible')) {
                        $drop.slideUp();
                        $page.animate({'padding-top': '20px'});
                        $feature.animate({'padding-top': '0px'});
                        $(this).removeClass('dropped');
                        $nav.removeClass('dropped');
                    }
                    else {
                        if($(this).parents('li').siblings().children('a').hasClass('dropped')){                          
                            $drop.siblings().slideUp(); // hide all siblings menu blocks
														$element.animate({'padding-top': 0},function(){
															$element.animate({'padding-top': $padding_top + $padding });
															$drop.slideDown();
															});
                        }else{
                            $element.animate({'padding-top': $padding_top + $padding});
                            $drop.slideDown();
                        }
			
                        $(this).addClass('dropped');
                        $(this).parents('li').siblings().children('a').removeClass('dropped');
                        $nav.addClass('dropped');
                    }
                }
            });

            // Setup shrink buttons on dropdowns
            $('#dropdowns .drop').append('<a href="#" class="close">Close</a>');
            $('#dropdowns .drop a.close').click(function(e){
                e.preventDefault();
                $('a.dropped', $nav).click();
            });

			}
};

Rally.sidebarMenu = {
    init: function(context, settings) {
        $('.menu-block-wrapper > ul.menu > li.expanded.active-trail', context).addClass('open');
    //$('.menu-block-wrapper > ul.menu > li.expanded > a', context).click(function(e){
    //	e.preventDefault();
    //	var $li = $(this).parent('li.expanded');
    //	var $menu = $li.parent('ul.menu');
    //	var $show = $('> ul.menu', $li);
    //	if ( ! $li.is('.open')) {
    //		// Menu states
    //		$('li.open > ul.menu', $menu).slideUp();
    //		$show.slideDown();
    //		// Link states
    //		$('> li.open', $menu).removeClass('open');
    //		$li.addClass('open');
    //	}
    //	else {
    //		$show.slideUp();
    //		$li.removeClass('open');
    //	}
    //});
    }
};

/**
* Feedback Tray
*/
Rally.accordion = {

    init: function(){
        var $accordions = $('.rw-accordion');
        $accordions.each(function(i, el){
            var $el = $(el);
            $('> li', $el).each(function(j, li){
                $('*:not(.handle)', li).filter('*:not(.static)').wrapAll('<div class="rwa-content"></div>');
                $('.rwa-content', li).hide();
            });

            $('.handle', $el).click(function(e){
                e.preventDefault();
                var $p = $(this).parents('li');
                if ($p.is('.open')) {
                    return;
                }
                else {
                    $('> li.open', $el).removeClass('open').find('.rwa-content').slideUp();
                    $p.addClass('open').find('.rwa-content').slideDown();
                }
            });

            $('.handle:eq(0)', $el).click();
        });
    }

};



/**
* Event View Filter Checkboxess
*/
Rally.fancyCheckboxes = {

    init: function(context, settings) {
        //modify the selector in the follow line if you want this to apply to
        // more than just the events list:
        var $filters = $('.events-list .view-filters', context);
        var $list = $filters.find('select[multiple=multiple]');
        var $options = $list.find('option');

        if($options.length > 0) {
            var $checkboxes = $('<div>').addClass('fancy-checkboxes').appendTo( $filters );

            $options.each(function(idx, item) {
                $item = $(item);
		if (window.location.href.indexOf('?type')!=-1){
			//if type GET vars are detected leave alone
			var classes = $item.attr('selected') ? 'fancy-checkbox fancy-checked' : 'fancy-checkbox';
		} else {
			//if this is the event page with no GET vars, then select and check all
			$item.attr('selected', 'selected');
			var classes = 'fancy-checkbox fancy-checked';
		}
                
                $('<div>').addClass( classes )
                .data('val', $item.val() )
                .html( $item.html() ).appendTo( $checkboxes );
            });

            $filters.addClass('fancy-processed');

            $filters.find('.fancy-checkbox').click(function(e) {
                e.stopPropagation();
                var val = $(this).data('val');

                if( !$(this).hasClass('fancy-checked') ) {
                    $(this).addClass('fancy-checked');
                    $list.find('option[value=' + val + ']').attr('selected', 'selected');
                }
                else {
                    $(this).removeClass('fancy-checked');
                    $list.find('option[value=' + val + ']').removeAttr('selected');
                }

                $filters.find('.form-submit').click();
            });
        }
    }

};

})(jQuery);

jQuery(document).ready(function(){
	if (jQuery.browser.msie && jQuery.browser.version == '7.0'){
	jQuery('#logo').css('margin-top','15px').appendTo('.region-header');
	centerLogosHoriz();
	centerLogosIE();
	//alert('ie7 detected, '+jQuery.browser.version);
}

});
/* Handles tall logo images */
function centerLogosHoriz() {
	if (jQuery('body').hasClass('front')){
		jQuery('.views-content-field-customer-logo img').each(function()
		{
				thisImageHeightCss = jQuery(this).height();
				thisImageWidthCss = jQuery(this).width();
				if (thisImageHeightCss >  thisImageWidthCss)
				{
				 jQuery(this).css('position','relative');
				 jQuery(this).css('display','block');
				 jQuery(this).css('margin-top','2');
				}
		});
	}
}

function centerLogosIE() {
jQuery('.views-content-field-customer-logo img').each(function()
 {
		 thisImageHeightCss = jQuery(this).height();
		 if (thisImageHeightCss >= 0)
	 {
		 jQuery(this).css('margin-top',((70-parseInt(thisImageHeightCss))/2));
		 }
		 });
}

function invoke_gated_media(thisNode)
{
	jQuery('a[href*="'+thisNode+'"]').click();
};
/*
 * 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 3620 2007-10-10 20:55:38Z pmclanahan $
 *
 */
(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);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";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;}if(data.indexOf('{')<0)data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);;
/**
* swapImage - $ plugin for swapping image(s)
*
* Copyright (c) 2010 tszming (tszming@gmail.com)
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/

/**
* Enable image swapping, requires metadata plugin.
*
* @example $.swapImage(".swapImage");
* @desc Enable image swapping for all images with CSS class name equal to "swapImage", e.g.
* <img class="swapImage {src: 'images/new.gif'}" src="images/old.gif" />
*
* @param i Images to be selected.
* @param preload Preload the image, default = true.
* @param repeat Repeat the effect, default = true.
* @param swapInEvent Event for swap In.
* @param swapOutEvent Event for swap Out.
*
* @name $.swapImage
* @cat Plugins/SwapImage
* @author tszming (tszming@gmail.com)
* @version 1.0.5
*/

(function($) {

    $.swapImage = function(i, preload, repeat, swapInEvent, swapOutEvent) {

        $.swapImage.files = {};
        $.swapImage.data = {};
        $.swapImage.uuid = 0;

        $.swapImage.init = function() {
            var id = ++$.swapImage.uuid;
            $(this).attr("swapImageId", id);
            var data = $(this).metadata();
            $.swapImage.data[id] = $.swapImage.data[id] || {};

            if (typeof data.src != "undefined") {
                $.swapImage.data[id]["src"] = data.src;
                $.swapImage.files[data.src] = false;
            }

            $.each(
            $.grep([[data.sin, "sin"], [data.sout, "sout"]],
            function(n) {
                return (typeof n[0] != "undefined" && n[0].length > 0);
            }),
            function() {
                var arr = this[0];
                var vname = this[1];
                for (var i = 0; i < arr.length; i++) {
var idx = data[vname][i].indexOf(":");
var selection = data[vname][i].substring(0, idx);
var file = data[vname][i].substring(idx + 1);
                    $.swapImage.data[id][vname] = $.swapImage.data[id][vname] || [];
                    if (idx > 1) {
                        $.swapImage.data[id][vname].push([selection, file]);
                        $.swapImage.files[file] = false;
                    } else {
                        $.swapImage.data[id][vname].push([file]);
                    }
                }
            });
        };

        $.swapImage.preload = function() {
            $.each($.swapImage.files,
            function(k, v) {
                if (v == false) {
                    $.swapImage.files[k] = true;
                    var img = new Image();
                    img.src = k;
                }
            });
        };

        $.swapImage.swapIn = function() {
            $.swapImage.swap(this, "sin");
        };

        $.swapImage.swapOut = function() {
            $.swapImage.swap(this, "sout");
        };

        $.swapImage.swap = function(obj, a) {
   var id = $(obj).attr("swapImageId");
            if (typeof $.swapImage.data[id][a] != "undefined") {
                for (var i = 0; i < $.swapImage.data[id][a].length; i++) {
                    if ($.swapImage.data[id][a][i].length > 1) {
                        $($.swapImage.data[id][a][i][0]).attr("src", $.swapImage.data[id][a][i][1]);
                    } else {
                        $($.swapImage.data[id][a][i][0]).each($.swapImage._swap);
                    }
                }
            } else {
                $.swapImage._swap.call(obj);
            }
        };

        $.swapImage._swap = function(obj) {
var id = $(this).attr("swapImageId");
            var data = $.swapImage.data[id];
            if (typeof data.src != "undefined") {
                var tmp = data.src;
                data.src = this.src;
                this.src = tmp;
            }
        };

        $(document).ready(function() {

            if (typeof repeat == "undefined") {
                repeat = true;
            }

            if (typeof preload == "undefined") {
                preload = true;
            }

            $(i).each($.swapImage.init);

            if (typeof swapInEvent == "undefined" && typeof swapInEvent == "undefined") {
                swapInEvent = "mouseenter";
                swapOutEvent = "mouseleave";
            }

            if (repeat) {
                if (typeof swapOutEvent != "undefined") {
                    $(i).bind(swapInEvent, $.swapImage.swapIn).bind(swapOutEvent, $.swapImage.swapOut);
                } else {
                    $(i).bind(swapInEvent, $.swapImage.swapIn);
                }
            } else {
                $(i).one(swapInEvent, $.swapImage.swapIn);
            }

            if (preload) {
                $(i).each($.swapImage.preload);
            }
        });
    };

})(jQuery);;
(function ( $ ) {
	$.swapImage(".swapImage");
}) (jQuery);
;

