/**
* Site PartnerBoxController
*
* @author Szijártó Tamás ( szicsu )
* @email  szicsu@jquery.hu
**/

if ( typeof Site != 'object'){
    var Site = {};
}

Site.PartnerBoxController = new function(){
	var self = this;
	
	
	this.keresoInit = function(){
		
		if( !$('body').hasClass('listing') ){
			return;
		}
		
		Site.PartnerBoxSearch.init();
		$(window).bind('unload', Site.PartnerBoxSearch.destruct );
	
	}
	
	
	this.kepInit = function(){
		
		if( !$('body').hasClass('adverts') ){
			return;
		}
		
		Site.Component.Galery();
	}
	
	this.initIframeResize = function(){
		//window.location.hash = 'docHeight:' + $('body').height() ;
		parent.window.location.hash = 'hasznaltmotorok.iFrameResize({height:' + parseInt($('body').height()+20) + '})';
	}
	
	
	
	$(document).ready(function(){
        for( var i in self){
            if( typeof( self[i] == 'function' ) ){
                self[i]();
            }
        }
    });
	
}

Site.PartnerBoxHistoryBack = function(){
	
	if( $.browser.mozilla ){
		history.go(-2)
	}
	else{
		history.back();
	}
	
	return;
}
