/**
 * Initialize $.CORE in case it's not present
 */
if(typeof $.CORE == "undefined") {
	$.CORE= Object;
};

/**
 * Dummy object
 */
$.CORE.dummyobject = {
	construct : function() {
	},
	
	dummyFunction : function() {
	}
};

/**
 * Forms
 */
$.CORE.forms = {
	construct : function() {
		this.execFormCheckerPlugin();
	},
	
	execFormCheckerPlugin : function() {
		var $formRef = $('form.formGenerated');
		if($formRef.length) {
        	$formRef.formChecker();
		}
	}
};

/**
 * Executes when the DOM has been fully loaded
 */
$(document).ready(function() {
	$.CORE.forms.construct();
	
	$("ul#topnav").superfish({
		autoArrows: false
	});
	
	var origQ = $('#q').val();
	$('#q').focus(function(){
		if($(this).val() == origQ) {
			$(this).val('');
		}
	}).blur(function(){
		if($(this).val() == '') {
			$(this).val(origQ)
		}
	});
	
	$('.sliderContainer').cycle({
		fx: "scrollHorz",
		timeout: 8000,
		prev: ".sliderPrev",
		next: ".sliderNext"
	});
	
	$('.partnerContainer').cycle({
		fx: "scrollHorz",
		timeout: 5500
	});
});
