/*(c) Mindshelf 2010 All Rights Reserved.Web Framework- Core FunctionsNo unauthorised copying or editing without permissionAuthor ~ Matt Hallam*/$('.date_selected').ready(function(){$('.date_selected').click(function(){if($('.selectscroll:eq(3) a').length>1){selectscroll(3);return false;}else{document.location='http://www.hoamztorent.co.nz/news-news-archive/queenstown/';}});});window['hist']=null;$('.article_list').ready(function(){$('.articles_hld a').each(function(i,val){$('.articles_hld a:eq('+i+')').click(function(){var u=$(this).attr('href').split('?');var a=u[1].split('&');var b=a[1].split('=');a=a[0].split('=');b=b[1];a=a[1];$('.article>.selected').removeClass('selected');$('.article'+b).addClass('selected');$('.date_selected span').html($('.selectscroll a[attr="'+a+'"]').html());selectscroll(3,true);set_hash(u[1]);return false;});});$('.article_list .selectscroll a').each(function(i,val){$('.article_list .selectscroll a:eq('+i+')').click(function(){var u=$(this).attr('href').split('?');var a=u[1].split('=');a=a[1];$('.articles_hld>.selected').removeClass('selected');$('.article_month'+a).addClass('selected');$('.date_selected span').html($('.selectscroll a[attr="'+a+'"]').html());selectscroll(3,true);set_hash(u[1]);return false;});});});function set_hash(new_hash){if(new_hash==''){current_hash='';}else{window.location.href.substr(0, window.location.href.indexOf('#'));}fixPanel();};var current_hash = window.location.hash;function check_hash(){if(window.location.hash!=current_hash){current_hash=window.location.hash;page_change(current_hash.substr(1,current_hash.length));}};hashCheck=setInterval("check_hash()",50);function page_change(h){if(h!=''){if(h.indexOf('&')>0){var a=h.split('&');var b=a[1].split('=');a=a[0].split('=');b=b[1];a=a[1];$('.article>.selected').removeClass('selected');$('.article'+b).addClass('selected');$('.date_selected span').html($('.selectscroll a[attr="'+a+'"]').html());}else{var a=h.split("=");a=a[1];$('.articles_hld>.selected').removeClass('selected');$('.article_month'+a).addClass('selected');$('.date_selected span').html($('.selectscroll a[attr="'+a+'"]').html());}set_hash(h);}};$(document).ready(function(){page_change(current_hash);});